Skip to main content
Glama

Explain an architecture rule

archprint_explain
Read-onlyIdempotent

Explains one architecture rule from a scan by ID, label, or ESLint name, including status, adoption, violating files, and fixes so agents can verify compliance before coding.

Instructions

Explain one rule from archprint_scan in depth, by its id, label or ESLint name (e.g. AP-002, env-access, no-lib-to-app, "lib !-> app" or archprint/no-lib-to-app): its statement, gate status, adoption (enforce, review, or report-only, as in archprint_scan), observed conformance and confidence floor, and every file that breaks it (scan lists only a few). For the forbidden-import rules (AP-001, AP-002) it also returns each confidence-gate condition with its value and threshold, how to fix a violation, and when not to adopt the rule. A rule the team stated in CLAUDE.md or AGENTS.md and adopted (its id starts with doc-) comes back with the sentence the team wrote, its source line, what it enforces in plain words, its evidence and its exceptions. 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": {
      "id": "<id>"
    },
    "name": "archprint_explain"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesrule id, label or ESLint name from archprint_scan, e.g. AP-002, no-lib-to-app or "lib !-> app", or a declared rule id such as doc-no-fetch-in-components
pathNoapp or monorepo-root directory on this machine (default "."), not a URL

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.18.0
    • changedInput schema / properties / id / description
      Previous value: -"rule id, label or ESLint name from archprint_scan, e.g. AP-002, no-lib-to-app or \"lib !-> app\""New value: +"rule id, label or ESLint name from archprint_scan, e.g. AP-002, no-lib-to-app or \"lib !-> app\", or a declared rule id such as doc-no-fetch-in-components"
  2. Changed1 schema field changedv0.16.0
    • changedInput schema / properties / id / description
      Previous value: -"rule label from archprint_scan, e.g. AP-002 or env-access"New value: +"rule id, label or ESLint name from archprint_scan, e.g. AP-002, no-lib-to-app or \"lib !-> app\""
  3. Changed1 schema field changedv0.9.0
    • changedInput schema / properties / path / description
      Previous value: -"app or monorepo-root directory (default \".\")"New value: +"app or monorepo-root directory on this machine (default \".\"), not a URL"
  4. First observedv0.8.3

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already mark it read-only, idempotent and non-destructive, and the description goes well beyond that by enumerating the response payload: statement, gate status, adoption mode, observed conformance, confidence floor, all violating files, confidence-gate conditions with values and thresholds, fix guidance, and when not to adopt. It also flags a special case — doc- rules returning the team's written sentence, source line, evidence and exceptions — which an agent could not infer from 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?

The valuable information is front-loaded: identity of the tool, accepted id forms, then what comes back. It is a single dense sentence with nested parentheticals and paired quoted examples, which makes it harder to scan than a bulleted or multi-sentence layout, but no sentence is filler and the trailing 'Read-only.' is the only near-redundancy with annotations.

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?

With no output schema, the description carries the full burden of describing returns, and it does so thoroughly for the general case and for the AP-001/AP-002 and doc- rule special cases. Minor gaps remain: it does not say what happens when an id is unknown or ambiguous, nor how the default path resolves.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, and the description earns a lift by broadening the accepted identifier namespace: rule id, human label, ESLint name, quoted arrow notation like "lib !-> app", and doc- prefixed ids from CLAUDE.md/AGENTS.md, tying them back to archprint_scan output. It says nothing about the path parameter beyond what the schema already documents, so it is not a full 5.

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 and resource: 'Explain one rule from archprint_scan in depth, by its id, label or ESLint name.' It also explicitly differentiates from the sibling scanner by noting scan 'lists only a few' broken files while this returns 'every file that breaks it,' so an agent can pick between archprint_scan and archprint_explain without opening either 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?

Usage context is clear and implied-through-contrast: this is the drill-down after archprint_scan, and it names the ID forms a caller will have in hand from that tool. There is no explicit when-not clause (e.g. 'use archprint_check to verify a fix' or 'do not use for repo-wide summaries'), but the scan-vs-explain split is unambiguous.

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