Skip to main content
Glama

audit_instruction_bloat

Read-onlyIdempotent

Audit CLAUDE.md, AGENTS.md, and rule files for 30-turn token cost, code-fence bloat, and duplicate instructions, then rank expensive sections to trim prompt overhead.

Instructions

Audit CLAUDE.md, AGENTS.md, .cursorrules, .windsurfrules, and optional .mcp.json sections for 30-turn cumulative token cost, embedded code-fence bloat, and cross-file duplicate instructions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "audit_instruction_bloat"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoOptional array of { path, content } objects for custom rule or MCP config files.
turnsNoSession turn count used for cumulative section ranking (default: 30).
mcpJsonNoOptional .mcp.json string included alongside instruction files for unified static-prefix ranking.
modelIdNoReference LLM pricing tier ID.claude_sonnet_4_5
agentsMdNoRaw markdown content of AGENTS.md.
claudeMdNoRaw markdown content of CLAUDE.md.
cursorRulesNoRaw content of .cursorrules.
windsurfRulesNoRaw content of .windsurfrules.
sessionsPerMonthNoMonthly session count used for savings projections.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so safety is fully covered. The description adds the analytical model (cumulative 30-turn cost, code-fence detection, cross-file deduplication) but says nothing about output shape, whether analysis is local/offline, or how partial inputs are handled.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that names the target files first, then the analyses, with zero filler. It is dense but readable, and no sentence could be removed without losing substance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nine-parameter, zero-required analysis tool with no output schema, the description covers what is analyzed but not what the agent receives back or how to interpret results. Annotations carry the safety profile, but the lack of return-shape context leaves a real gap for a tool whose value is entirely in its report.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every one of the nine parameters is already documented in the schema, including defaults and bounds for turns, sessionsPerMonth, and modelId. The description only adds the notion of "optional" custom files and unified static-prefix ranking for .mcp.json, which is marginal beyond the schema baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description pairs a specific verb ("Audit") with named resources (CLAUDE.md, AGENTS.md, .cursorrules, .windsurfrules, .mcp.json) and states the three analyses performed: 30-turn cumulative token cost, code-fence bloat, and cross-file duplicates. It implicitly separates itself from audit_mcp_schema_tokens by focusing on instruction files rather than MCP schema, but never names a sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the enumerated file types — an agent can infer this is the tool for auditing instruction-file bloat. There is no explicit when-to-use statement, no exclusion, and no routing to alternatives such as simulate_agent_session_cost or find_optimal_compact_turn, which touch adjacent cost-analysis concerns.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.