Skip to content
Data
Command

/add-tool

Add a new MCP tool to server.py

From plugin
astronomer-data
4593 skills3 commands
> /plugin marketplace add astronomer/agents
> /plugin install astronomer-data@astronomer

Command definition

add-tool.md
description: Add a new MCP tool to server.py
argument-hint: [tool-name]

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:

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:

@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.

@astronomer
Ships withastronomer-data

AI agent tooling for data engineering workflows. Includes an MCP server for Airflow, a CLI tool (af) for interacting with Airflow from your terminal, and skills that extend AI coding agents with specialized capabilities for working with Airflow and data

Stars on GitHub

Momentum

stars in total
459
Star history of astronomer/agents on GitHub, a chart by star-history.com

Other commands on astronomer-data.

More commands from other plugins.

COMMANDS.generated

COMMANDS.generated

Command

<!-- Generated from backend/logic/schema.py. Do not edit. Run `hogli build:projections`. -->

posthog11d41k
@posthog@posthogInstall Command
recall
Auto-invoked

recall

Command

Search past session observations and lessons for relevant context. Wrap the `memory_smart_search` and `memory_lesson_recall` MCP…

@rohitg00@rohitg00Install Command