add_reference
Create a typed reference edge between threads or messages in the same workspace, validating existence, workspace boundaries, duplicates, and cycles before returning the stored reference.
Instructions
Create a typed edge from a source thread or message to a destination thread or message in the same workspace, and return the reference (id, src_kind, src_id, dst_kind, dst_id, relation, created_at). Refused when both ends are the same entity, an end does not exist, the ends are in different workspaces, the identical edge exists already, or a depends, supersedes or duplicates edge would close a cycle. Appends a ReferenceAdded event; read edges back with list_references. For task ordering that holds back claim_next use add_thread_dependency instead. Requires workspace:write and read access to both ends.
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": {
"src_kind": "<src_kind>",
"src_id": "<src_id>",
"dst_kind": "<dst_kind>",
"dst_id": "<dst_id>",
"relation": "<relation>"
},
"name": "add_reference"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dst_id | Yes | UUID of the destination thread or message, as chosen by dst_kind. You must be able to read it. | |
| src_id | Yes | UUID of the source thread or message, as chosen by src_kind. You must be able to read it. | |
| dst_kind | Yes | What dst_id names: thread or message. | |
| relation | Yes | Relation name from the src end to the dst end. Controlled set: supports, refutes, defines, depends, duplicates, grounds, supersedes, seeded_from. Any other string is accepted and stored as given. | |
| src_kind | Yes | What src_id names: thread or message. |