SpecifyDocs

session_create

tools/call

Register a new agent work session. Send machine (this computer's hostname) so Agents groups your sessions by machine and client. To say which project task it works on, pass the task's taskId (from task_list, task_get or task_claim) or its key (DEV-20) as projectTaskId; the task then lists the session. Linking needs read:projects and a task you can read.

Scopes

write:agent_sessions

Also needs read:projects when projectTaskId is given or linkedWorkItemId names a project task, and read:work when linkedWorkItemId names a Work item.

Inputs

titlestringRequired
Session title
objectivestringRequired
Concrete objective
projectTaskIdstring
Optional taskId or key (DEV-20) of the project task this session works on
linkedWorkItemIdstring
Optional legacy Work item ID (work_list). A project task's taskId or key here links that task, as projectTaskId does.
machinestring
This computer's name, such as its hostname
clientstring
Optional agent app name, such as claude-code or codex. Defaults to the MCP client name.
modelstring
The model you run on, such as claude-opus-5-5, as your client names it. Each change that names this session records it, labelled as reported by you. Specify does not check it
idempotencyKeystringRequired
Retry key you choose. The same call sent again with the same key within 24 hours writes nothing twice: if an answer is lost or unclear, send the same call with the same key. Use a new key for a new change

Returns

The created session. A call returns content[0].text with the JSON result and structuredContent.result with the same value.

Listed when

The connection has agent access and every scope the tool needs.