Skip to main content
Glama

MCPGuard Remote MCP

audit_rules_file

Audit an AI agent rules file (AGENTS.md, CLAUDE.md, .cursorrules, SKILL.md, copilot-instructions.md) for invisible Unicode Tag stego, Bidi overrides, non-emoji zero-width controls, embedded secrets, dangerous shell payloads, and Context Tax token bloat.

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": "audit_rules_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
sarifNoIf true, include SARIF 2.1.0 report.
contentYesRaw UTF-8 text content of the rules file.
fileNameNoFilename label (default: AGENTS.md).
sanitizeNoIf true, also return sanitizedContent with invisible backdoors stripped while preserving compound Emoji.
maxTokensNoAdvisory Context Bloat threshold in estimated tokens (default: 4000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden; it does name all six detection categories and implies the tool inspects supplied text rather than touching the filesystem. It never states that it is read-only/stateless, whether findings are deterministic, or what a 'hit' looks like, and the sanitize/rewrite behavior is only visible in the schema.

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 enumeration is dense but every item names a distinct check category. It could be marginally tighter, but nothing is redundant.

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 5-parameter tool with no annotations and no output schema, the description covers the input side well but says nothing about the shape of the returned findings (severity levels, SARIF vs. text, how sanitizedContent differs), which an agent must guess before relying on the result.

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 baseline is 3; the description adds essentially nothing beyond it. The filenames listed loosely correspond to fileName examples, but sarif, sanitize, and maxTokens are explained only in the schema.

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

Purpose5/5

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

States a specific verb (Audit) and a specific resource (AI agent rules file), then enumerates the file types accepted (AGENTS.md, CLAUDE.md, .cursorrules, SKILL.md, copilot-instructions.md) and the exact checks performed. This clearly separates it from siblings like audit_mcp_config and audit_deps, which target different artifacts.

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: an agent can infer it should call this when it has a rules-file to inspect, and the mention of 'Context Tax token bloat' hints at the maxTokens scenario. There is no explicit when-to-use/when-not guidance and no reference to the related sanitize_mcp_config sibling for remediation.

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.

Resources