add-tool

A command for adding a new MCP tool to an Airflow integration server. MCP is a standard way for an AI agent to call functions provided by another program.

In plain words
What is it for?
Use it when creating a tool in `server.py`, adding its internal implementation and description, connecting it to an adapter method, and updating the README.
Why use it?
It gives the new tool a consistent implementation, connects it to the appropriate Airflow adapter, and records it in the project's tool documentation.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/astronomer/agents/add-tool
Clone the repo
git clone --depth 1 https://github.com/astronomer/agents

Made for: Claude Code.

Per session 8 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 243 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00008 $0.00243
Opus 5 $0.00004 $0.00121
Sonnet 5 $0.00002 $0.00049
Haiku 4.5 $0.00001 $0.00024

Measured 2d ago against content hash b92b02edc9a8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-tool scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • add-tool — 100% identical, 0 lines differ
astro-airflow-mcp/.claude/commands/add-tool.md · 46 lines

What it actually says

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)
  1. 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)
  1. Add the tool to README.md tools table.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 46 lines · 8 tokens per session scan A b92b02edc9a8

Subscribe to this mod's changes

add-tool is a command published in the GitHub repository astronomer/agents (432 stars, last pushed 15d ago), licensed Apache-2.0. It adds 8 tokens to every session and 243 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.