mcp-tool-docstring

mcp-tool-docstring is a skill for Claude Code, Codex from X-School-Academy/skill-pilot. It costs 47 tokens per session (1,214 once invoked), scanned A, original, MIT.

A writing guide for Python docstrings that describe tools exposed through an MCP server. MCP is a standard way for an AI agent to call tools provided by another program.

In plain words
What is it for?
Use it when adding, changing, or reviewing an MCP tool’s docstring before it is converted into an agent skill.
Why use it?
It helps docstrings follow the format required by the project’s synchronisation process, so they become usable skill descriptions and instructions.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding, changing, or reviewing an MCP tool’s docstring before it is converted into an agent skill.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/x-school-academy/skill-pilot/mcp-tool-docstring
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.

Any agent
npx skills add X-School-Academy/skill-pilot --skill mcp-tool-docstring
Clone the repo
git clone --depth 1 https://github.com/X-School-Academy/skill-pilot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-tool-docstring

README.md
[![agentmods](https://agentmods.dev/badge/skills/x-school-academy/skill-pilot/mcp-tool-docstring/github.svg)](https://agentmods.dev/skills/x-school-academy/skill-pilot/mcp-tool-docstring)
Your own site
<a href="https://agentmods.dev/skills/x-school-academy/skill-pilot/mcp-tool-docstring"><img src="https://agentmods.dev/badge/skills/x-school-academy/skill-pilot/mcp-tool-docstring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-tool-docstring

Your own site · 80×15
<a href="https://agentmods.dev/skills/x-school-academy/skill-pilot/mcp-tool-docstring"><img src="https://agentmods.dev/badge/skills/x-school-academy/skill-pilot/mcp-tool-docstring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,214 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00047 $0.01214
Opus 5.5 $0.00019 $0.00486
Sonnet 5.5 $0.00009 $0.00243
Haiku 4.5 $0.00005 $0.00121

Measured 16d ago against content hash 73b944fb591f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcp-tool-docstring 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 16d 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.

core/skills/system/mcp-tool-docstring/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Platform Builder - MCP Tool Docstring

This skill guides writing Python docstrings for system MCP tools (@mcp.tool()) in the format that the mcp-to-skills sync pipeline recognizes. When synced, the first line becomes the skill description field and the remaining content is placed at the top of the skill body.

When to Use This Skill

  • Adding a new @mcp.tool() function to a system MCP server
  • Updating an existing system MCP tool docstring to follow the standard
  • Reviewing a system MCP tool docstring for correctness

Your Roles in This Skill

  • Backend Developer: Write and validate the docstring structure
  • Technical Writer: Ensure clarity, completeness, and correct formatting of each section

Role Communication

As an expert in your assigned roles, you must announce your actions before performing them using the following format:

As a {Role} [and {Role}, ...], I will {action description}

This communication pattern ensures transparency and allows for human-in-the-loop oversight at key decision points.

Instructions

Step 1: Write the Docstring

Follow this structure exactly:

@mcp.tool()
def tool_name(param1: str, param2: int = 10) -> str:
    """One-line tool description under 1024 characters with no line breaks.

    Use this tool when you need to <describe the primary use case>.
    Best for <specific scenarios or input patterns>.

    Args:
        param1: Description of param1. Constraints or format notes.
        param2: Description of param2. Must be between X and Y.

    Returns:
        Description of what is returned. Include key fields if returning a dict or list.
        - field_name: what it contains

    Do not use this tool:
        - to <alternative action that has a better tool>
        - when <condition where another tool is preferred>

    Notes:
        - Any important behavioral details, ordering, edge cases.
        - If no matches found, returns an empty list.
    """

Step 2: Validate the First Line

Read the full file on GitHub · 133 lines

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. 16d ago First seen · 133 lines · 47 tokens per session scan A 73b944fb591f

Subscribe to this mod's changes

mcp-tool-docstring is a skill published in the GitHub repository X-School-Academy/skill-pilot (20 stars, last pushed 4mo ago), licensed MIT. It adds 47 tokens to every session and 1,214 once invoked, about $0.0002 per session on Opus 5.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-10-02.

Related

Other skills, from other repositories

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

component-fixtures

Use when creating or updating component fixtures for screenshot testing or their shared infrastructure, or when designing UI components to be fixture-friendly. Covers fixture file structure, theming, service setup, CSS scoping, async rendering, validation, and common pitfalls.

microsoft/vscode · 53 tokens