agents-register
agents-registerRegister an MCP agent session using alias and machine id to obtain a session ID for subsequent operations. Automatically updates existing sessions on reconnect.
Instructions
Registers an MCP agent session. Upserts on (user_id, machine_id, alias) — reconnects update the existing row. Returns the agent_session_id used by other tools.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"alias": "<alias>",
"machine_id": "<machine_id>"
},
"name": "agents-register"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alias | Yes | Human-readable agent name (e.g., "home-desktop", "work-laptop") | |
| capabilities | No | Optional freeform list of capability strings (e.g., ["code", "casemgr", "billing"]) | |
| current_case_id | No | Optional RID of the case this agent is currently focused on | |
| machine_id | Yes | Machine identifier (hostname); pairs with alias to dedupe reconnects | |
| webhook_url | No | Optional HTTP(S) URL. When a notification targets this agent (messages, AI work items), CaseMgr POSTs a JSON payload to this URL before attempting MCP sampling. Use to wake up dormant workers — the webhook handler spawns claude -p to process the event. | |
| worktree_path | No | Optional filesystem path of the git worktree the agent is running in. If a Worktree exists at (machine_id, worktree_path), a RunsIn edge is created and the worktree's last_seen is bumped. |