# Conventions

> Conventions for AI agents working in Klarity over MCP: dates and time zones, ids, field names, pagination, write access, and when to confirm with the user.

Read this before your first change in a workspace.

## Dates and time zones

- A date or time without an offset is wall time in the user's Klarity time zone, named in the server instructions. Send `2026-12-04T14:00` for 2 pm the user's time; do not convert to UTC.
- A value with an offset (`Z`, `+01:00`) is converted to the user's zone.
- Task dates: `YYYY-MM-DD` is all day, `YYYY-MM-DDTHH:MM` is timed. They come back as naive wall time; an all-day due date reads `…T23:59:59`, an all-day start `…T00:00:00`.
- Range filters take a date (the whole day) or a date-time.
- Block, event and time entry times come back as UTC instants. Convert them to the user's zone before showing them. `list_at_risk_tasks` already answers in the user's zone.
- Resolve "today" and "next week" in the user's zone. Klarity's weeks start on Monday.

## Ids and fields

- Ids are opaque strings from a list or get tool. Never guess one. When a name matches several records, ask which.
- Inputs are snake_case (`due_date`). Most results are camelCase (`dueDate`).
- Results leave out empty fields (null, `''`, `[]`). A write returns the record as its get tool does, related records as `{id, name}`.
- List rows leave out what is implied: the assignee (tasks) or `userId` (time entries) when it is the user, the client when it is the project's, and cut descriptions to 80 characters. The get tool has everything.

## Pagination

List tools take `limit` (at most 100) and `offset`. A full page may mean more: page on before reporting a total. Prefer filters to reading everything.

## Access

- The user picks the workspaces a connection may reach when connecting; the server instructions name them. With several, every tool acts in the default one unless you pass `workspace` (name or id). Workspaces are separate: nothing crosses between them. Say which one you acted in.
- Reading works for everyone. Changes need the owner or manager role, an active subscription or trial, and a connection set to "Read and change".
- A refused change returns an error with the reason. Tell the user; do not retry or work around it.
- Other members' personal tasks and private projects are invisible. Only the owner can read another member's schedule.

## Confirm before acting

- Destructive: `delete_invoice`, `cancel_process_run`, cancelling tasks, overwriting a dossier. Ask first.
- Bulk the user did not spell out: changing many records they did not name ("clean up my tasks"). Show the list, then act on a yes. A request that names the job ("bill Hartmann", "plan my week") is the yes.
- Money or other people: marking invoices sent or paid, recording payments. Ask first.
- A single change the user asked for (add this task, log this time) needs no extra check. Report what changed, with names and dates.
- Never invent estimates, rates or durations. Ask, or say what you assumed.
