Skip to main content
Glama

threadctx

Check agent instruction files

check_agent_instructions
Read-onlyIdempotent

Check the text of AI coding agent instruction files (CLAUDE.md, AGENTS.md, .cursor/rules/*.mdc, .github/copilot-instructions.md, GEMINI.md, .mcp.json and similar) for prompt injection, hidden Unicode, instructions to download and run code, leaked secrets, unpinned or insecure MCP servers, and duplicated or conflicting instructions between files. Pass each file's repository path and full text. Use this when someone shares an instruction file, asks whether one is safe, or asks why their agent ignores or contradicts a rule. Nothing is stored.

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": {
      "files": "<files>"
    },
    "name": "check_agent_instructions"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesThe files to check, with the path each has in the repository (the path decides which agent loads it).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety bar is partly met; the description adds that nothing is stored and that the check is purely textual analysis of supplied content. It also implicitly sets expectations that the caller must supply content rather than a repo reference ('Pass each file's repository path and full text'). It does not describe cost/latency, size limits, or how findings are reported, so a returning 4 rather than 5.

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?

Front-loaded with the check and its targets, followed by the usage triggers and a short non-persistence note. The mid-sentence list of check categories is long but each item is informative and none 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 diagnostic tool, the description covers inputs and scenarios well but says nothing about the shape of the result (per-file findings, severity, whether clean files are reported), and there is no output schema to fall back on. It also does not mention the 30-file cap or what to do for larger repositories, leaving the agent to discover limits at call time.

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%, including the nested path/content fields and the note that the path decides which agent loads the file, so the schema carries the semantics. The description's 'Pass each file's repository path and full text' usefully reinforces that both fields are required, but adds nothing the schema does not already say; baseline 3 applies.

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 (check) and resource (AI coding agent instruction files) and enumerates the concrete file types it targets (CLAUDE.md, AGENTS.md, .cursor/rules/*.mdc, .github/copilot-instructions.md, .mcp.json). It also names the exact classes of problems it looks for (prompt injection, hidden Unicode, download-and-run instructions, leaked secrets, insecure MCP servers, conflicting rules), so an agent can distinguish it from explain_rule or scan_github_repo without opening the schema.

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

Usage Guidelines4/5

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

Explicit triggers are given: when someone shares an instruction file, asks whether one is safe, or asks why their agent ignores or contradicts a rule. That is clear context for selection. It does not state when-not to use it or point to a sibling for whole-repository scanning, which keeps it short of a 5.

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.