shrink-mcp-tool-docs — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited shrink-mcp-tool-docs (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Goal: minimize chars (tokens) shipped to client LLM through @mcp.tool descriptions — tool description (whole docstring) and Field(description=...) param descriptions — push to failure boundary while keeping eval gate GREEN. Run as compress → eval → compress loop: probe boundary, adopt last GREEN before it. RED never committed — RED mean "one cut too far."
Be deliberate. One tool at a time. Each cut small delta from current GREEN, never jump to absolute terse form. Snapshot before every cut. On RED, bisect cut set — never full-revert to original (net-zero trap). Reproduce RED before trusting it (min_pass_rate=1.0 make single RED possibly noise).
Repo does not use Google-style Args:/Returns: docstrings. Verified surfaces:
properties[p].description); docstring edit cannot touch them.Don't trust list blind — reprove with Step-0 dump each run; refactor or FastMCP change can move text between surfaces.
description. Signature untouched. Fully honors "signature/return/logic unchanged."Field(description=...) strings. Touch only description= string — never type, default, min_length/max_length, or validators. Params often big share of LLM-facing chars (~40% on param-heavy tools, per Step-0 dump), so Scope B roughly doubles reachable savings.If operator not opted into Scope B, every `Field(description=...)` no-op for your edits — exclude from reducible baseline, report as such.
Dump what reaches client, confirm edits change it. mcp.list_tools() async, returns list[FunctionTool] with .name, .description, .parameters.
REPO=$(git rev-parse --show-toplevel) # capture repo root before leaving it
cd /tmp && uv run --project "$REPO" python \
"$REPO"/.claude/skills/shrink-mcp-tool-docs/scripts/dump_schema.pyRun from /tmp so repo .env not auto-loaded (poisons PolarionConfig if it holds OPENAI_API_KEY). Record per tool: desc chars (Scope A target), param chars (Scope B target), total. Sort descending — long tools = biggest savings first. Dump authoritative — never assume fixed tool count or total; set drifts. If tokenizer (tiktoken) available, also note token counts; else chars primary metric.
Per param, confirm schema description text matches what you intend to edit. Param whose text lives in Field(description=...) won't move under Scope-A edit — flag no-op (Scope B).
Prose (→ `description`, most important)
"Updates a work item" → "Call to change fields on an existing work item; fetch it first."other_tool").move_*").list_work_item_enum_options, get_sql_query_recipes, move_work_item_to_document).Field descriptions (→ schema params; Scope B only)
Form
WARNING:/NOTE: prefixes. No banner comments. Consistent tense/terms/format.Global prep
main (e.g. chore/shrink-mcp-tool-docs) — never run loop on main. Each adopted GREEN committed, so per-cut rollback just git restore <file> (or git checkout -- <file>) back to that commit — no stash juggling; working tree only ever holds in-flight cut. Whole session lands as one squashed commit/PR.EVAL_MODEL's default openai/gpt-4o-mini (CI doesn't override). Needs OPENAI_API_KEY; if unset, STOP and report — never substitute local/ollama model, boundary found on different model REDs real gate. Then assume branch starts GREEN (released tip), run one Fast gate to confirm harness runs and green — not full Confirm; re-proving already-green tip with 10 runs wasted cost. Fast RED at entry = pre-existing breakage → STOP (not yours to fix here). That first GREEN your baseline; checkpoint it.Cut risk classes (L1 safest → L4 riskiest; draw candidate cuts in this order, cheapest-risk first — these risk ordering of edits, not atomic rungs to jump to):
Per tool (incremental descent + bisection) — each cut small delta from current GREEN, never jump to absolute terse form; RED recovered by bisecting cut set, never reverting to original (revert-to-original net-zero trap):
git restore <file> returns file to that committed GREEN — no separate snapshot needed.4-a. Fast GREEN → run Confirm gate:
4-b. Fast RED — bisect candidate set, do NOT full-revert:
min_pass_rate=1.0: reproduce RED once (re-run Fast) before calling cut load-bearing — lone RED can be noise.Invariant: RED discards only last delta, never accumulated GREEN. Net-zero for tool happens only if its very first L1 trim RED — meaning already at floor.
Confirm-gate cost: smaller deltas mean more iterations, so don't run (expensive) Confirm gate per delta far from floor. For early L1 deltas, batch up to ~3–5 Fast-GREEN deltas (or one full risk-class pass, whichever first) and Confirm once before switching risk class; near boundary, Confirm per delta. Batched Confirm RED bisects batch.
Global stop: all tools locked; or full pass's cumulative saving < ~50 chars; or operator-set iteration cap hit. On stop, re-run all gates at last GREEN baseline, confirm green. Submission = last GREEN, never RED.
Preconditions (once): uv sync --group evals — strands_evals not in default env. Eval agent's model from EVAL_MODEL (default openai/gpt-4o-mini), publish gate uses that default — so leave at default, provide `OPENAI_API_KEY`. Optimizing against different model (e.g. local ollama) unsound vs gate (see Global prep 2). Run eval/pytest from CWD outside repo when repo .env carries OPENAI_API_KEY (shadows PolarionConfig); cd /tmp && uv run --project <repo> ... avoids it.
Fast gate (cheap triage after each cut):
uv run python -m evals.run --runs 1
uv run pytest tests/mcp_server_polarion/test_mcp_transport.py -qtriggers/safety (min_pass_rate=1.0) and efficiency/orchestration (0.8). Docstring cuts regress both kinds — too-terse description can make agent take wasteful path (efficiency) even when it never does forbidden action (safety). Read gate summary, not just exit code.uv run python -m evals.run --case <NAME> --runs 1 (browse case names + intents with uv run python -m evals.run --list).Confirm gate (before committing/locking a baseline — kills variance + overfit):
uv run python -m evals.run --runs 5 # raise toward boundary; full default = EVAL_RUNS (10)
uv run pytest
uv run ruff check . && uv run ruff format . && uv run mypy src/--runs near boundary. GREEN/RED that flaps across runs = unstable cut → do not adopt; keep last stable GREEN.--case), never run during loop, run only at Confirm. Held-out RED = overfit → revert that cut.Trigger/when line · one sibling-boundary line when near-duplicate tool exists · enum allowed-values and ID/date formats · source of values from other tools' output · pointers to runtime-callable tools (get_sql_query_recipes, list_*_enum_options, move_*). Transport test asserts every description non-empty — empty description guaranteed RED.
Keep constraint/format phrasings byte-exact — never abbreviate single character. Load-bearing because agent copies them verbatim into payloads:
MCPT-123, 5-segment link id, 3-segment module id form.YYYY-MM-DDThh:mm:ssZ.one of: open, inProgress, done.Shortening any of these (e.g. YYYY-MM-DD → "a date") can make agent emit malformed value even when eval happens to pass on that run.
uv run python -m evals.run (triggers/safety all pass at 1.0; efficiency/orchestration at 0.8)uv run pytest (esp. tests/mcp_server_polarion/test_mcp_transport.py and tests/evals/)uv run ruff check . && uv run ruff format . && uv run mypy src/description= string of Field(...); never type/default/constraint/logic. Signatures, return types, behavior unchanged in both.get_sql_query_recipes, etc.).EXPECTED_TOOL_NAMES alone. Don't touch get_sql_query_recipes guide body (transport test asserts its content).[tool | cut (Lx set / bisect-subset / single restore) | Fast | Confirm | decision (commit/bisect/lock)]; each RED cut + its diagnosis (which tool mis-selected and why) + bisection outcome on one line.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.