mycomcp-tool-development-lifecyclelisted
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