twining_register
Register or update agents in the Twining MCP Server to make subagents visible in the coordination dashboard and merge capabilities during re-registration.
Instructions
Register a new agent or update an existing one. Merges capabilities on re-registration. Use this to make subagents visible in the coordination dashboard.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | Unique identifier for the agent (e.g. 'code-reviewer', 'test-runner') | |
| capabilities | No | Agent capabilities (e.g. ['testing', 'typescript']) | |
| role | No | Agent role (e.g. 'reviewer', 'implementer') | |
| description | No | Human-readable description of what the agent does |
Implementation Reference
- src/tools/coordination-tools.ts:80-131 (handler)The implementation of the `twining_register` tool, which registers or updates an agent in the registry using the agentStore and optionally populates a graph.
// twining_register — Register or update an agent in the registry server.registerTool( "twining_register", { description: "Register a new agent or update an existing one. Merges capabilities on re-registration. Use this to make subagents visible in the coordination dashboard.", inputSchema: { agent_id: z .string() .describe("Unique identifier for the agent (e.g. 'code-reviewer', 'test-runner')"), capabilities: z .array(z.string()) .optional() .describe("Agent capabilities (e.g. ['testing', 'typescript'])"), role: z .string() .optional() .describe("Agent role (e.g. 'reviewer', 'implementer')"), description: z .string() .optional() .describe("Human-readable description of what the agent does"), }, }, async (args) => { try { const record = await agentStore.upsert({ agent_id: args.agent_id, capabilities: args.capabilities, role: args.role, description: args.description, }); // Auto-populate graph with agent entity if (graphPopulator) { await graphPopulator.onRegister(args.agent_id, args.capabilities, args.role); } return toolResult({ agent_id: record.agent_id, capabilities: record.capabilities, role: record.role, description: record.description, registered_at: record.registered_at, last_active: record.last_active, }); } catch (e) { return toolError( e instanceof Error ? e.message : "Unknown error", "INTERNAL_ERROR", ); } }, );