twining_delegate
Delegate tasks to agents by posting capability requirements to a shared blackboard and receive ranked suggestions based on match quality.
Instructions
Post a delegation request to the blackboard as a 'need' entry with capability requirements. Returns suggested agents ranked by match quality.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | Yes | Description of the task to delegate (max 200 chars) | |
| required_capabilities | Yes | Capabilities needed for this task | |
| urgency | No | Urgency level affecting timeout (default: 'normal') | |
| timeout_ms | No | Custom timeout in ms (overrides urgency-based default) | |
| scope | No | Scope for the delegation (default: 'project') | |
| tags | No | Additional tags for the delegation entry | |
| agent_id | No | ID of the delegating agent (default: 'main') |
Implementation Reference
- src/tools/coordination-tools.ts:170-224 (handler)The implementation of the 'twining_delegate' tool in `src/tools/coordination-tools.ts`. It registers the tool with the MCP server and delegates the execution to `coordinationEngine.postDelegation`.
// twining_delegate — Post a delegation request to the blackboard server.registerTool( "twining_delegate", { description: "Post a delegation request to the blackboard as a 'need' entry with capability requirements. Returns suggested agents ranked by match quality.", inputSchema: { summary: z .string() .describe("Description of the task to delegate (max 200 chars)"), required_capabilities: z .array(z.string()) .describe("Capabilities needed for this task"), urgency: z .enum(["high", "normal", "low"]) .optional() .describe("Urgency level affecting timeout (default: 'normal')"), timeout_ms: z .number() .optional() .describe("Custom timeout in ms (overrides urgency-based default)"), scope: z .string() .optional() .describe("Scope for the delegation (default: 'project')"), tags: z .array(z.string()) .optional() .describe("Additional tags for the delegation entry"), agent_id: z .string() .optional() .describe("ID of the delegating agent (default: 'main')"), }, }, async (args) => { try { const result = await coordinationEngine.postDelegation({ summary: args.summary, required_capabilities: args.required_capabilities, urgency: args.urgency, timeout_ms: args.timeout_ms, scope: args.scope, tags: args.tags, agent_id: args.agent_id, }); return toolResult(result); } catch (e) { return toolError( e instanceof Error ? e.message : "Unknown error", "INTERNAL_ERROR", ); } }, );