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, andsrc/services/linear-service.tsto find the closest pattern. - Check whether the capability already exists in
LinearService. - Inspect
@linear/sdkbefore 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 testandnpm 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.