add-mcp-toollisted
Install: claude install-skill Sisuthros/claude-amplifier
# Add or Modify an MCP Tool
Adding a tool touches several layers that must stay in sync. A tool that has a
schema but no router case, or a handler with no validation, ships broken. This
card is the checklist that keeps the chain complete.
## Repo reality (verify before you assume)
As of v1.5.0 the tool definitions and the request router live **together in
`src/index.ts`**:
- **Tool schemas** are defined as the `TOOLS` array in `src/index.ts`
(each entry: `name`, `description`, `inputSchema`).
- **The router** is the `CallToolRequestSchema` handler in the same file — a
`switch (request.params.name)` with one `case "amplify_*"` per tool.
- **Handlers** (the actual logic) live in `src/tools.ts`.
- **Storage** methods live in `src/storage.ts`.
> ⚠️ `src/index.ts` already holds 13 tool schemas and is growing. Schemas are
> **not** split into per-tool modules yet. When you add a tool, follow the
> existing in-`index.ts` pattern for consistency — but if `index.ts` is becoming
> unwieldy, do the split as its **own** dedicated, reviewable change (move the
> `TOOLS` array into `src/schemas.ts` and import it), **never** as a drive-by
> inside a feature commit. Do not bolt a new schema onto a file that someone is
> mid-way through splitting.
## Required steps
1. **Schema.** Add/update the tool entry in the `TOOLS` array in `src/index.ts`
(`name`, a precise `description`, and a complete `inputSchema` with required
fields and enums). The description is what the agent reads