Skip to main content
Glama

ContextGuard — AI Coding Token & Compaction Auditor

contextguard_audit_markdown

Audits AGENTS.md, .cursorrules, or project boot markdown for startup token bloat, duplicate rules, and context-compaction loop risk.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "content": "<content>"
    },
    "name": "contextguard_audit_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesRaw markdown or instruction file text to audit.
fileNameNoOptional filename (e.g. AGENTS.md or .cursorrules).
windowTokensNoModel context window size in tokens (default 200000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden. It does add real behavioral content by naming the specific failure modes detected (token bloat, duplicate rules, compaction loop risk), which tells the agent what class of problem this diagnoses. However, it never states whether the tool is read-only or modifies files, nor what the audit report contains or how findings are ranked, leaving material behavior undisclosed.

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 with no filler; the resource list and the three detection targets each carry information. Slightly dense with comma-separated lists, but nothing is wasted and the core purpose leads.

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 single-shot analysis tool with three simple scalar parameters, the description covers the input side adequately. But no output schema exists, so the description is the only place a return-shape expectation could be set, and it says nothing about the audit report's structure or whether findings include line references and severity. That omission leaves the agent guessing about what comes back from an audit call.

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 content, fileName, and windowTokens are already fully documented in the input schema, establishing a baseline of 3. The description adds nothing about the parameters — notably it never connects windowTokens to the token-bloat analysis, which would have been genuinely useful semantic context. It neither compensates nor detracts.

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 ("Audits") with named resources (AGENTS.md, .cursorrules, project boot markdown) and enumerates the three defects it hunts for: startup token bloat, duplicate rules, and context-compaction loop risk. An agent knows exactly what the tool inspects and what it reports on. It stops short of naming any sibling (e.g. contextguard_slim_boot_card) as the remediation counterpart, so the 5-tier differentiation criterion is unmet.

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?

The file-type enumeration (AGENTS.md, .cursorrules, boot markdown) implicitly tells the agent when this applies, so usage is inferable rather than stated. There is no explicit when-to-use condition, no exclusion, and no pointer to the slimming sibling for follow-up action. Guidance is adequate but left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.