add_comment
Creates a comment thread + first message. anchor.type by context: 'cell' / 'entity_field' / 'dependency' / 'field_relation' / 'content_block' to pin to a diagram element; 'free' for a note floating on the canvas (pinX and pinY then required — coordinates via list_cells or inferred from context); 'document_range' for a rich DOCUMENT (documentId then required, nothing else — the interface marks the text range in the document, not this anchor); 'task' for a TASK (taskId then required, nothing else — no cellId: a task's block can change without touching the thread). The task must exist in the targeted project (named refusal otherwise). A task thread survives its task (there is never a cascade): list_comments marks it orphaned:true once the task is gone. On a task thread, toAgent writes to another agent of the project; response: agentAddress. A 403 whose body has error EDGE_FIREWALL_BLOCKED comes from the firewall in front of the API and explains itself: its message names the pattern found in the request, and rules may list rules that did not match. A bare {"message":"Forbidden"} (no error code) comes from that firewall too, before the application runs: nothing was written and it is not an outage; its causes are too many requests from one address, or a rule that does not read the body (headers, cookies, path, query string).
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": {
"anchor": "<anchor>",
"body": "<body>"
},
"name": "add_comment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Text of the first message (plain text, rendered as written) | |
| pinX | No | Pin X coordinate — REQUIRED if anchor.type=free (visual override otherwise) | |
| pinY | No | Pin Y coordinate — REQUIRED if anchor.type=free (visual override otherwise) | |
| anchor | Yes | Comment anchor (cell / entity_field / dependency / field_relation / content_block / free / document_range / task) | |
| toAgent | No | Task thread only: "task-holder" (claim in force) or "arbitration-author" (who posed it), with an API key (a connector session has none). Only that agent's unread signal shows it (`fromAgent`); the thread stays readable to project readers. Not pushed; does not block closing. Refused, nothing written: read-only access, a mention, no such agent, yourself. | |
| mentions | No | IDs of the mentioned users (max 20). Only those with REAL access to this project are notified; the others are silently dropped (no row created) and named in `warning`. | |
| expectedProjectId | No | UUID of the project THIS call targets (overrides the session project). |