Skip to main content
Glama

canon_check

Audit text or a rendered CanonDocument against R-invariants and return per-rule findings, severities, verdict, and reproducible hash.

Instructions

Canon — audit text or a CanonDocument against R-invariants (engine v0.2.0 enforces R1, R2, R5, R10, R13, R14; R13 is the stakes-adaptive format heuristic added in v0.2.0; R3/R4/R6/R7/R8/R9/R11/R12 remain 'partial' by design — see canon_layer.md and audit.py). Returns an AuditReport with per-R findings, severities, an overall verdict in {pass, fail, safety_fail, partial}, and a reproducible hash for R9 diffability. Reference: ivd/canon_layer.md §Audit.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "canon_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoRaw text — Canon will Tier-1-render then audit. Provide either `text` or `document`.
stakesNoStakes hint (only used when starting from `text`).medium
documentNoA previously rendered CanonDocument (output of canon_render's `document` field). Audited as-is.
domain_packNoDomain pack id (default 'general').general

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.2

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does most of it well: it discloses which rules are enforced (R1, R2, R5, R10, R13, R14), which remain partial by design, that R13 is a version-added heuristic, and the exact shape of the return (per-R findings, severities, verdict enum, reproducible hash). It never states that the operation is read-only/non-mutating or whether Tier-1-rendering has any side effects, which keeps it short of 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?

The core purpose is correctly front-loaded in the first clause, but the subsequent parentheticals are a dense doc dump enumerating rule IDs and file references that the description itself points readers to anyway. Two sentences earn most of their place, yet the rule inventory and 'see canon_layer.md/audit.py' citations could be trimmed without losing callable information.

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?

There is no output schema, so the description must describe returns — and it does, naming AuditReport, per-R findings, severities, the verdict set, and the R9 hash. Given the unusual domain (custom R-invariants), it is nearly complete, though it omits what happens with zero findings, invalid input, or how partial rules affect the verdict.

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 the baseline is 3. The description restates the same semantics — text gets Tier-1-rendered, document is audited as-is, stakes applies only when starting from text — without adding format expectations, mutual-exclusivity rules, or failure behavior for supplying both parameters.

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?

States a specific verb and resource: 'audit text or a CanonDocument against R-invariants', and names the engine version plus the returning type. It is clear what the tool does, but the R-number shorthand only means something to an agent already versed in this domain, and it never explicitly distinguishes itself from siblings like canon_diff or canon_check_rules_installed.

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: you supply raw text or a rendered document, and the audit tells you whether output conforms to invariants. There is no explicit when-to-use/when-not statement, no routing advice toward canon_check_rules_installed for installed-rule queries, and no statement of prerequisites. The 'Provide either text or document' split lives in the schema, so the prose adds little.

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