fastmcp-pythonlisted
Install: claude install-skill matthull/my-skills
# FastMCP/Python Practice
## CRITICAL: Tool Naming Convention (ABSOLUTE)
FastMCP uses Python function names directly as MCP tool names.
- Use `snake_case` for tool function names
- MCP tool name will be: `mcp__<server-name>__<function_name>`
- Test tool discoverability after adding new tools
Never use colon namespacing (FastMCP doesn't support it).
---
## CRITICAL: Verify Tools are Discoverable (ABSOLUTE)
You MUST verify new/modified tools are visible to Claude Code before handoff.
- Restart MCP server after code changes
- Verify tool appears in tool list
- Test invocation in a fresh Claude session (tmux-sidecar)
---
## CRITICAL: Smoke-Test Real APIs Before Coding (ABSOLUTE)
**Never build response parsing from documentation alone when wrapping an external API.**
When API credentials are available:
1. Make a real API call (curl) BEFORE writing parsing code
2. Paste actual JSON response into implementation notes
3. Build all data mappings from REAL response, not docs
4. Note divergences from docs explicitly
Common divergences this catches:
- Enum values with/without prefixes
- Flat vs nested fields
- Top-level vs array-nested data
- Absent fields the docs claim exist
If credentials NOT yet available: flag in handoff, implementer must smoke-test first.
---
## Tool Function Pattern
```python
@mcp.tool()
async def tool_name(param1: str, param2: int = 10) -> str:
"""One-line description shown in tool list.
Longer description with usage details.
"""