| name | add-mcp-tool |
| description | Add or update an MCP tool in the mcp-linear repository. Use this when implementing new Linear capabilities or exposing an existing service method through the MCP surface. |
Use this workflow when adding a tool to mcp-linear.
Goal
Implement a Linear capability end-to-end so the MCP surface, runtime behavior, and docs stay aligned.
Workflow
- Inspect the existing domain files under
src/tools/definitions, src/tools/handlers, and src/services/linear-service.ts to find the closest pattern.
- Check whether the capability already exists in
LinearService.
- Inspect
@linear/sdk before writing new GraphQL.
- Implement or update the service method so it returns normalized plain objects.
- Add or update the tool definition with explicit required fields, enums, nullability, and numeric constraints.
- Add or update the handler so it validates, delegates, and logs failures.
- Add or update the type guard in
src/tools/type-guards.ts.
- Register the tool in both index files.
- Update
TOOLS.md.
- Add focused tests in
src/__tests__.
- Run
npm test and npm run build.
Project-specific reminders
- Prefer SDK methods first.
- If you use direct GraphQL because the SDK is stale or missing support, document why.
- Keep handlers thin.
- Be exact about nullable update semantics and output schema fidelity.