ClaudeSuperPower

add-tool

Command

Add a new MCP tool to server.py

412Other
Type this in Claude Code
/add-tool [tool-name]
tool-name
optional
Claude can also invoke this on its own inherits all session tools

What it tells Claude to do

40 lines

The prompt this command injects, verbatim. Worth reading before you run it.

Add a new MCP tool named `$ARGUMENTS` to `src/astro_airflow_mcp/server.py`.

## Steps

1. If the tool needs a new adapter method, run `/add-adapter-method` first.

2. Create internal `_impl` function that calls the adapter:

```python
def _tool_name_impl(param: str) -> str:
    """Internal implementation."""
    try:
        adapter = _get_adapter()
        data = adapter.method_name(param)
        return json.dumps(data, indent=2)
    except Exception as e:
        return str(e)
```

3. Create the MCP tool with descriptive docstring:

```python
@mcp.tool()
def tool_name(param: str) -> str:
    """One-line description.

    Use this tool when the user asks about:
    - "Example query 1"
    - "Example query 2"

    Args:
        param: Description

    Returns:
        JSON with response data
    """
    return _tool_name_impl(param=param)
```

4. Add the tool to README.md tools table.

Shipped by 3 plugins

Installing any of these installs this command.

More than one plugin defines this name. Installing two of them together means they compete for the same invocation — pick one, or expect the later install to win.

What this can do

Capabilities declared in this component's own frontmatter — not inferred.

Inherit all session tools

Declares no tool restrictions — inherits every session tool

~8 tokens of context used while enabled, before you invoke anything

Trust

87/100 · Excellent

2 factors scored below maximum

Reviews

Log in to leave a review.

No reviews yet — be the first.

Explore related

Other things in this space — across every part of the ecosystem, not just commands.