send_to_role
Route messages to active agents by role instead of naming handles, enabling domain handoffs when you don’t know who is on shift; optionally post one question for the role.
Instructions
Route a message by function: DM every active agent whose role is role,
instead of naming a handle. This is how you hand work to whoever owns a
domain (e.g. send_to_role("reviewer", "please review #123")) without knowing
who is on shift. Delivers one DM per matching agent; yourself is excluded,
and only agents on your project or a linked one are reached. Returns the
recipients it hit — an empty list means no one currently holds that role.
With question=True it posts ONE question addressed to the role instead of
one DM per holder. Every holder sees it until one of them answers; if nobody
holds the role yet, it waits for the first session that takes it. Same
project only. Returns the question's guid; track it with questions.
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": {
"role": "<role>",
"body": "<body>"
},
"name": "send_to_role"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| role | Yes | ||
| urgent | No | ||
| question | No |