← ClaudeAtlas

mycomcp-tool-development-lifecyclelisted

Comprehensive lifecycle for authoring, registering, documenting, and maintaining MCP tools in packages/myco/src/tools/ — covering schema definition in TOOL_DEFINITIONS arrays, handler implementation with DaemonClient patterns, shared tool-runtime registration, documentation bundling, anti-drift testing patterns, and per-symbiont transport (mcp vs cli) decisions. Essential for maintaining the schema ↔ handler ↔ documentation triad that agents depend on for correct tool invocations, even when the user doesn't explicitly ask for MCP tool development.
goondocks-co/myco · ★ 13 · AI & Automation · score 79
Install: claude install-skill goondocks-co/myco
# MCP Tool Development and Anti-Drift Maintenance MCP tools are the primary interface between agents and the Myco intelligence pipeline. Each tool requires a coordinated schema ↔ handler ↔ documentation triad that can drift over time, causing silent agent failures. This skill covers the complete development lifecycle and maintenance procedures to prevent drift regressions. ## Prerequisites - Working Myco development environment with `packages/myco/src/tools/` structure - Understanding of JSON Schema for parameter definitions - Familiarity with TypeScript handler patterns and DaemonClient usage - Understanding of shared tool-runtime supporting multiple transports (MCP stdio, HTTP MCP, CLI) ## Procedure A: Schema Definition Define the tool interface in `packages/myco/src/tools/definitions.ts` (shared tool-runtime definitions): 1. **Add tool name constant** at the top of the file: ```typescript export const TOOL_MY_NEW_TOOL = 'myco_my_new_tool'; ``` 2. **Add schema entry** to `TOOL_DEFINITIONS` (the single local tool-definition array — there is no separate cloud/Collective array; the daemon's Collective MCP integration was removed): ```typescript { name: TOOL_MY_NEW_TOOL, description: 'Brief description of what this tool does — agents use this for selection decisions', cortex: { guidance: 'Clear guidance for when to use this tool vs alternatives', priority: 50, }, annotations: { readOnlyHint: true, destru