mcp-tool-checklist

Solid

End-to-end checklist for adding a new MCP tool

AI & Automation 69 stars 13 forks Updated today MIT

Install

View on GitHub

Quality Score: 81/100

Stars 20%
61
Recency 20%
100
Frontmatter 20%
40
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# MCP Tool Checklist Use this when adding a new `#[tool]` to basemind's MCP server. Skipping a step leaves the tool half-wired. The MCP surface is split **by domain**, not into monolithic `types.rs` / `tools.rs` / `helpers.rs`. Pick the slice that matches the tool's area — `comms` / `git` / `web` / `memory` / `governance` / `code` / `admin` / `archmap` / `registry` / `shells` / `compress` (plus `documents` / `graph` / `impls` for types) — and add to the `*_<domain>.rs` trio. Only fall back to the catch-all `types.rs` / `helpers.rs` when no domain fits. Every file stays under the 1000-line cap. ## Steps 1. **`src/mcp/types_<domain>.rs`** (e.g. `types_git.rs`, `types_web.rs`, `types_code.rs`) - Add `#[derive(Deserialize, Serialize, JsonSchema)] pub(super) struct <Tool>Params { … }`. - Add the matching `<Tool>Response`. Use `Option<T>` + `#[serde(default)]` for optional fields. - Path inputs use `RelPath`. Limits default to 100, cap at 1000. 2. **`src/mcp/tools_<domain>.rs`** (e.g. `tools_git.rs`, `tools_web.rs`; `tools.rs` is now a thin dispatcher that aggregates the per-domain `#[tool]` impls — add code-map tools there only if no domain slice fits) - Add an `async fn <tool>(&self, Parameters(p): Parameters<<Tool>Params>) -> Result<CallToolResult, McpError>`. - Annotate with `#[tool(description = "...")]`. Description states matching semantics (substring vs prefix), scope-awareness, and any caps. - Body is a thin wrapper: `helpers_<domain>::run_<too...

Details

Author
Goldziher
Repository
Goldziher/basemind
Created
2 years ago
Last Updated
today
Language
Rust
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category