add-mcp-tool
Skill2 starsChanged 3 months agoMITView on GitHub
Add or change a Synapse MCP tool while keeping the profile, budget, and coverage contracts. Use when asked to expose new functionality over MCP, change a tool's signature or docstring, or move a tool between profiles.
12 other projects use a version of this.
Adopted by
Most recently taken up by
- janusson/MSMCPtheir own version, first seen Oct 25, 2026
- skillist-io/skillisttheir own version, first seen Oct 11, 2026
- james5101/jobtracktheir own version, first seen Oct 11, 2026
- letehaha/moneymattertheir own version, first seen Oct 11, 2026
- openfootmanager/openfootmanagertheir own version, first seen Oct 8, 2026
- dragoscv/axiomtheir own version, first seen Sep 21, 2026
Other versions12 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 12
- openfootmanager/openfootmanager★ 1.2ksame name
- letehaha/moneymatter★ 221same name
- dylanroscover/Embody★ 213same name
- tacticlaunch/mcp-linear★ 147same name
- radimsem/remindb★ 125same name
- paulieb89/property-shared★ 16same name
- plumbkit/plumb★ 4same name
- james5101/jobtrack★ 2same name
- janusson/MSMCP★ 1same name
- skillist-io/skillist★ 1same name
2 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ab-evalSkill
- add-adapterSkill
- add-languageSkill
- releaseSkill
- schema-changeSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
DEFAULT profile is contractually the two-call navigation surface — adding to it is a major design decision, not a convenience.
- Distinctive: line 42
Every bounded, paginated, truncated, ambiguous, heuristic, or empty result must make its coverage explicit.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add or change an MCP tool
0. Design gate — does this tool deserve to exist?
The surface optimizes total task tokens and turns, not single-response size. Before adding a
tool, prefer extending one bounded high-level core operation (search + traversal + ranking +
projection server-side) over adding another small primitive; many compact sequential calls cost
more context than one bounded response. Core logic lives in src/synapse/core; mcp is a thin
presentation layer and never contains logic; a tool never calls another tool.
1. Anatomy
Implement the operation in core first, then add a 1–5-line delegator in
src/synapse/mcp/tools.py decorated with @tool(...) from synapse/mcp/profiles.py:
- Registration is a decorator side effect; declaration order is registration order; the wire
name is
func.__name__, whichcli/doctor.expected_tools()also consumes — no second list. @tool()registers to the FULL profile;@tool(ToolProfile.DEFAULT, ...)to both. The DEFAULT profile is contractually the two-call navigation surface — adding to it is a major design decision, not a convenience.- The docstring is the wire contract the agent reads. First line = summary, body = contract. Tests assert exact phrases in docstrings; write them deliberately.
- Parameters are flat scalars/lists with defaults;
workspace_path: str = "."comes last. - Workspace access:
_workspace_index(path)for full-profile query tools (rejects an uninitialized workspace viarequire_workspace_ready);_navigation_workspace(path)for lazy-init navigation tools (readiness decisions live entirely incore.lifecycle). - Query tools return dicts, never
None; misses use the_not_found()envelope ({"found": False, "target", "reason", "hint"}). Argument validation raisesValueError. - Navigation-style tools return one budget-bound JSON string and pass
structured_output=Falseso the payload is serialized once, and they expose notoken_budgetparameter. Budgets live insrc/synapse/core/navigation/budget.py(orient 800, inspect 2400, public ceiling 4000;enforce_budgetapplies a hard character cap with deterministic drop steps).
2. Coverage rule
Every bounded, paginated, truncated, ambiguous, heuristic, or empty result must make its
coverage explicit. An empty result must never be readable as proof of absence, and a truncated
one must never look complete. If the new tool bounds anything, its payload carries a coverage
block and (for navigation-style payloads) payload_complete.
3. Test checklist (tests/mcp/)
test_profiles.py— bump the hard countassert len(full) == 19; DEFAULT set equality if the default surface changes (it almost never should).test_tools.py— add: a delegation test (monkeypatch the workspace helper and the core call, assert the exact request/return),_FakeIndex/_EmptyIndexsupport, a docstring-phrase assertion in the contract tests, an entry in the parametrizedtest_query_tools_require_lazy_workspace_initializationlist, and (if the tool can miss) the uniform not-found envelope aggregation.test_schema_budget.py— only if touching DEFAULT: the exact-two-tools assertion breaks, and the serialized{name, description, inputSchema}surface must stay ≤ 800 estimated tokens, so the docstring budget is shared.test_server.py— only if the server instructions text must mention the tool.
4. Docs
docs/tools.md— per-tool### synapse_xsection.AGENTS.md— the full-profile roster and the "(19 tools total)" count.docs/architecture.md— the tool roster line.CHANGELOG.md— entry under## [Unreleased].
5. Gate
uv run ruff check && uv run mypy && uv run pytest -q tests/mcpDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

