add-mcp-tool
Skill16 starsChanged 7 months agoMITView on GitHub
Use when adding a new MCP tool to the property MCP server (mcp_server/server.py). Provides the exact pattern with a copy-paste template.
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
- Locker-Room-Tools/synapsetheir 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
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★ 243same name
- dylanroscover/Embody★ 219same name
- tacticlaunch/mcp-linear★ 151same name
- radimsem/remindb★ 125same name
- plumbkit/plumb★ 4same name
- james5101/jobtrack★ 2same name
- Locker-Room-Tools/synapse★ 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.
- CLAUDE.mdCLAUDE.md
- property_app/CLAUDE.mdCLAUDE.md
- property-reportSkill
- property-searchSkill
- add-data-sourceSkill
- add-endpointSkill
- Create-MCP-AppSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Add a new tool to mcp_server/server.py following the established FastMCP pattern.
- Very specific: line 12
Add to mcp_server/server.py.
“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 an MCP Tool
Add a new tool to mcp_server/server.py following the established FastMCP pattern.
Step 1: Add the Tool Function
Add to mcp_server/server.py. The docstring becomes the tool description for AI hosts.
@mcp.tool()
async def new_tool(
required_param: str,
optional_param: Optional[str] = None,
limit: int = 50,
) -> ToolResult:
"""One-line description of what this tool does.
Args:
required_param: UK postcode (e.g. "SW1A 1AA")
optional_param: Optional filter description
limit: Maximum results (default 50)
"""
from property_core import SomeService # Step 2: lazy import
# Step 3: call property_core (sync → thread)
result = await anyio.to_thread.run_sync(
partial(
SomeService().method,
param=required_param,
limit=limit,
)
)
# Step 4: build and return ToolResult
data = result.model_dump(mode="json")
summary = f"Found {result.count} items for {required_param}"
return ToolResult(content=_content(summary, data), structured_content=data)Key Rules
- Lazy imports —
from property_core import Xinside the function body, never at module top level - Async wrapping — use
anyio.to_thread.run_sync(partial(...))for sync property_core calls. For already-async functions, justawaitthem directly. - ToolResult construction:
content= human-readable summary + slimmed JSON (via_content()helper)structured_content= full data dict for programmatic consumers
- Configuration-gated tools — if the data source needs credentials, check
is_configured()and return early with an explanatory message if not configured. Seeproperty_epc()for the pattern.
Helpers Available
_slim(obj)— stripsraw,images,floorplansfrom dicts recursively_content(summary, data)— builds content string: summary + "\n\n" + slimmed JSON
Checklist
- Tool added to
mcp_server/server.pywith@mcp.tool() - Function is
async - Imports are lazy (inside function body)
- Returns
ToolResultwith bothcontentandstructured_content - Summary line includes key metrics (count, median, etc.)
- Docstring includes
Args:section for all parameters
Does 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.

