agentsclimarketplace

New mcp tool

Skill justnau1020/claude-os/skills/development/new-mcp-tool

Add a new MCP tool to a FastMCP server. Use when adding a new tool for LLM agents or extending the MCP interface with new functionality.From its SKILL.md

Install
npx -y skills add justnau1020/claude-os --skill new-mcp-tool

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
  • runs commandsInstructs the agent to run 1 command, including `pytest tests/ -v -k "mcp"`.

SKILL.md

1.7 KB, 369 tokens by cl100k_base, as published. Nobody here has run it

Add a New MCP Tool

Add a tool to the project's FastMCP server.

Arguments

  • $ARGUMENTS -- Tool name in snake_case (e.g., get_user_profile)

Steps

1. Read the existing MCP server

Read the MCP server file to understand current tool patterns and the FastMCP setup.

2. Add the tool

@mcp.tool()
async def $ARGUMENTS(
    param1: str,
    param2: int = 10,
) -> str:
    """Clear description of what this tool does and when an LLM should use it.

    Include example parameter values to help LLMs understand expected input.
    Example: param1="example_value", param2=30
    """
    ...

3. Tool description conventions

The tool description is critical -- it's how LLMs decide when to call it:

  • First sentence: what the tool does
  • Second sentence: when to use it
  • Include parameter examples inline
  • Mention any constraints (rate limits, data availability)

4. Implementation conventions

  • Async only: All tool functions must be async def
  • Return strings: MCP tools return string responses for LLM consumption
  • Actionable errors: If something fails, return a helpful error string, not a generic one
  • Respect data boundaries: All data queries should respect the project's access control and data validation rules

5. Write tests

Add tests for the new tool's logic. Test:

  • Happy path with valid parameters
  • Error handling with invalid parameters
  • Data validation on returned data

6. Verify

pytest tests/ -v -k "mcp"

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.