Audit

From melodic-software/claude-code-plugins · View interactive version

Audit is an AI agent skill from the GitHub repository melodic-software/claude-code-plugins. Audit MCP server tool definitions against design quality criteria. Use when: 'audit MCP tools', 'check MCP tool descriptions', 'review MCP server quality', 'tool annotations', 'readOnlyHint missing', 'parameter descriptions missing', 'check the _meta annotations', 'maxResultSizeChars', 'requiresUser

How to use this skill

Skill file

Arguments. [path]. A directory to scope the audit to (e.g. a single server dir), or omit for the whole project.

Purpose

Evaluate MCP server tool definitions against design quality criteria drawn from three upstream

authorities, cited (not recapped) so the current text always governs:

Produces a per-tool scorecard with actionable findings. Catches description gaps, missing annotations,

and naming issues before they degrade LLM tool selection accuracy.

This skill runs as a blocking fork (context: fork, background: false; what that changes is

owned by the

invocation-context rubric).

$ARGUMENTS (an optional path) and the working tree are the whole input.

Server discovery configuration

Phase 1 enumerates MCP servers and their tool source files by scanning the project for the per-language

tool markers. The tool-marker, name-extraction, description-extraction, and meta-extraction

rules are upstream MCP-SDK conventions, stable across repos. See

reference/server-discovery.md for the per-language discovery rules and

how servers are grouped.

Arguments

Parse $ARGUMENTS:

Track progress

For multi-server audit runs (Phases 1-3 across ≥2 servers), keep an in-response checklist of the three

phases and tick each as it completes. Phase 2 may run subagent fan-out for ≥5 tools; check each

subagent's evidence before accepting its verdicts, then consolidate them into the one Phase 3 report.

Workflow

Phase 1: Discover servers and tools

Run bash "${CLAUDE_PLUGIN_ROOT}/skills/audit/scripts/discover.sh", adding --path <dir> when

$ARGUMENTS supplies a directory, to scope the scan to that directory.

Phase 2: Evaluate against checklist

Read each Tool file: from Phase 1. Per the language rules in

reference/server-discovery.md, extract descriptions, parameters,

wire-level annotations (C12-C14), and the tool's _meta object (C17-C19). The last via

meta-extraction, recording each key's JSON type and not merely its presence, because C18 turns on

it. Also record each parameter schema's x-mcp-header value, if any (C20). Load the detailed checklist from reference/checklist.md.

Once per server, also resolve its instructions field. See Server instructions in

reference/server-discovery.md and evaluate C4's per-server clause

against it. Phase 1's records are per-tool, so this is the only step that reaches it; its result lands

in the server-level row of the Phase 3 report, not in any tool's table.

Evaluate every criterion in the checklist against each tool, and C4's per-server clause once per

server. Record each result as:

assigns to C8, C11, C14, C21, and by default to C17-C19

declares no instructions gives C4's per-server clause nothing to size

found), which is not the same as its being absent

Phase 3: Report

Output a markdown report with this structure:

# MCP Tool Audit Report

**Date:** YYYY-MM-DD
**Servers audited:** N
**Tools audited:** N
**Overall:** X pass, Y warn, Z fail, W info

## Summary by server

| Server | Tools | Pass | Warn | Fail | Info |
|--------|-------|------|------|------|------|
| <server-name> | N | ... | ... | ... | ... |

## Findings by server

### Server: <server-name> (<language>)

Server-level criteria, the outcomes that belong to the server rather than to any one tool:

| Criterion | Authority | Result | Details |
|-----------|-----------|--------|---------|
| C4 Server `instructions` within size budget | OPINION | n/a | Construction site declares no `instructions` |

#### Tool: <tool_name>

| Criterion | Authority | Result | Details |
|-----------|-----------|--------|---------|
| C1 Description has "what" | ANTHROPIC | WARN | Missing "when to use" context |
| C9 Name charset/length valid | SPEC-SHOULD | PASS | |
| C12 readOnlyHint set | SPEC-OPTIONAL | WARN | Read-only tool lacks the hint |
| C18 requiresUserInteraction is JSON `true` | OPINION | FAIL | Declared as the string `"true"`, so silently ignored |
| ... | ... | ... | ... |

(repeat for each tool)

Prioritize FAIL items. Highest-value improvements. WARN items are suggestions and info items are

optimizations. The Overall line and the summary table count every outcome recorded for a server:

its tools' criterion rows and its server-level rows, across the four severity buckets. n/a and

undetermined are not severities: they record that a criterion had no subject, or none reachable, so

they appear only in the server-level criterion table and never count as a pass. A missing annotation

is never FAIL. Annotations are

OPTIONAL in the spec (C12-C14) or Claude-Code-specific advisories (C17-C19); only a declared value

Claude Code silently ignores can FAIL (C18). Likewise an absent x-mcp-header passes, and only a

declared one that breaks the spec's constraints can FAIL (C20). A destructive tool with no preview

counterpart is info only (C21).

Related

What this skill does not do

versions, publisher provenance, local stdio versus remote). Use /mcp-tools:audit-posture for that.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.