mq_send
Send messages between AI coding agents to coordinate tasks and delegate work across sessions and machines.
Instructions
Send a message to a target agent by name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| message | Yes | ||
| sender | Yes | ||
| msg_type | No | text | |
| priority | No | normal | |
| reply_to | No |
Implementation Reference
- mcp/src/client.ts:73-86 (handler)The `send` function in `client.ts` implements the API call to the backend to send a message. This is invoked by the `mq_send` tool handler in `mcp/src/index.ts`.
export async function send( target: string, message: string, sender: string, msgType = "text", priority = "normal", replyTo?: string, ) { const body: Record<string, string> = { target, message, from: sender, type: msgType, priority, }; if (replyTo) body.reply_to = replyTo; return api("POST", "/send", body); } - mcp/src/index.ts:24-33 (registration)The `mq_send` tool is registered here, defining the input schema and the handler that calls `client.send`.
server.tool("mq_send", "Send a message to a target agent by name", { target: z.string(), message: z.string(), sender: z.string(), msg_type: z.string().default("text"), priority: z.string().default("normal"), reply_to: z.string().optional(), }, async ({ target, message, sender, msg_type, priority, reply_to }) => ({ content: [{ type: "text", text: JSON.stringify(await client.send(target, message, sender, msg_type, priority, reply_to)) }], }));