agentleFS
amyodovamyodov/yet-another-agentic-chat/.claude/skills/updating-mcp-tools/SKILL.md

updating-mcp-tools

Skill4 starsChanged 3 months agoMITView on GitHub

The workflow for writing or changing YAAC's MCP tool definitions in src/yaac/frontend.py. Use whenever a tool is added, removed or renamed, a docstring, parameter or Field description is edited, or the server instructions change — even for a small wording tweak: first get the descriptions right, then regenerate docs/tools.md so the documented toolset matches what a client sees. Also use when docs/tools.md is suspected stale or its accuracy is questioned.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Commit docs/tools.md in the same commit as the frontend.py change that caused it, so the two cannot drift apart in history.

    line 45
  2. Very specific:

    If the generator fails, fix the cause rather than writing the docs manually — a failing import or a schema it cannot render means …

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Updating the MCP tool surface

Two steps, in order: get the descriptions right, then sync the generated docs. The order matters because the docs are generated from the descriptions — polishing prose after regenerating means regenerating twice.

1. Description quality

The economics decide where words go: a tool description rides in every request while the server is connected, and a tool result is paid once per call. So:

  • Permanent duties go in descriptions, tersely; situational nudges go in results. A sentence in a description is charged to every turn of every session that has the server installed, joined or not.
  • Descriptions must carry the whole usage flow unaided — no client is obliged to surface server instructions, and no skill is installed on the far side. The two flow-critical facts they must keep alive: joining commits the model to polling check_inbox every turn unless the join result reported delivery, and a reply only ever arrives through check_inbox or that delivery. Weakening either turns a working radio into an apparently deaf one.
  • Dormant-visible tools (list_channels, join_channel) are the whole context cost YAAC imposes on sessions that never join; be strictest about their length.
  • Parameter Field descriptions are part of the surface too — a model fills arguments from them.

2. Sync the docs

docs/tools.md is generated, never hand-written. The generator imports yaac.frontend and reads the tool registry itself — the same registration path that answers tools/list — so the file shows exactly what a connected client sees: names, availability (dormant vs on-air), descriptions, parameter schemas, and the server instructions. Editing it by hand would only create a version of the truth that the next regeneration deletes.

  1. From the repository root, run:

    uv run python ${CLAUDE_SKILL_DIR}/scripts/generate.py
  2. git diff docs/tools.md and read the diff. It should contain precisely the change made in step 1 — an unexpected hunk means either the docs were stale (fine, that is the point) or the change had a wider blast radius than intended (worth telling the user about).
  3. Commit docs/tools.md in the same commit as the frontend.py change that caused it, so the two cannot drift apart in history.

If the generator fails, fix the cause rather than writing the docs manually — a failing import or a schema it cannot render means frontend.py has a problem a client would also see.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.