Skip to main content
Glama

Verify the rules in CLAUDE.md or AGENTS.md

archprint_gap_report
Read-onlyIdempotent

Verifies rules stated in context files (CLAUDE.md, AGENTS.md, .cursor/rules) against repository code, maps each rule to a template, and returns a gap report showing what is already enforced or broken.

Instructions

Verify the rules a repo states in its context files (CLAUDE.md, AGENTS.md, .cursor/rules, ...) against its code. Read those files, then map each rule-like sentence to one template, quoting it exactly. archprint checks the quote is in the file and the mapping matches real files, measures how many files follow or break it, and returns a gap report: enforce now, enforce with a baseline (broken today, with the files), already an archprint rule, check the mapping, or guidance only. Show the report to the user: adopting a rule is their decision. Templates, with globs relative to path in ESLint syntax: "forbid-import" (files must not import targets, path globs matched on the file an import resolves to, or packages, specifier globs, each optionally limited to named imports such as {"name": "next/cache", "imports": ["unstable_cache"]}); "forbid-usage" (files must not use a global named in usage, such as "fetch", "window" or "process.env"); "forbid-file" (no new file may match files); "inferred" (the sentence is a rule archprint_scan lists; rule is its id); "none" (no template fits; give the reason, e.g. a style rule a standard linter covers). Read-only.

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": {
      "mapping": "<mapping>"
    },
    "name": "archprint_gap_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNorepository root on this machine, where the context files are (default "."), not a URL
mappingYesone entry per rule-like sentence

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered and the description adds real behavior beyond it: the quote is validated against the file, the mapping is checked against real files, and compliance is measured as counts of files following or breaking each rule. It also enumerates the five report outcome categories, which tells the agent what it will get back. It does not say what happens when a quote or mapping fails validation, which keeps it from a 5.

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

Conciseness3/5

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

Nearly every sentence carries necessary information, but the template definitions are packed into one long run-on sentence with deeply nested parentheses, making it hard to scan. The result categories and validation behavior are buried mid-paragraph rather than front-loaded, so structure, not length, is the weakness.

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

Completeness4/5

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

For a nested-schema tool with no output schema, the description covers the essentials: input construction (templates, globs, exact quotes), what is validated, and the shape of the returned gap report categories. It leaves open prerequisites (whether the repo must be scanned first) and failure behavior for invalid quotes or mappings, which are minor but real gaps.

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

Parameters5/5

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

Schema coverage is 100%, but the `template` enum carries no per-value documentation in the schema, and the description supplies it: forbid-import (path globs matched on the resolved file, packages specifier globs, optional named imports), forbid-usage (globals such as fetch or process.env), forbid-file, inferred (rule id from archprint_scan), and none (with a reason). It also adds that globs are relative to `path` and use ESLint syntax, meaning the agent could not construct a valid mapping from the schema alone.

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 names a concrete verb and resource: verify the rules a repo states in its context files (CLAUDE.md, AGENTS.md, .cursor/rules) against its code and return a gap report. It partly distinguishes itself from siblings by noting that the `inferred` template refers to rules archprint_scan lists, but it never contrasts itself with archprint_check, which an agent could easily confuse with this verification tool.

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?

It gives a clear workflow (read the context files, map each rule-like sentence to one template, quote exactly) and a usage constraint (show the report to the user, because adopting a rule is their decision). It lacks explicit when-not or alternative-tool guidance versus archprint_check or archprint_scan, so it falls 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.