Skip to main content
Glama

canon_check_rules_installed

Detect whether the Canon Phase 0a rules block is installed in a project's agent instruction files; returns ready-to-paste install payloads when missing so the agent can request user consent before editing.

Instructions

Canon — detect whether the IVD + Canon Phase 0a rules block (<BEGIN-CANON v1.0> / <END-CANON v1.0>) is installed in the active project's agent instruction files (.cursorrules, .clinerules, CLAUDE.md, .github/instructions/canon.md, AGENTS.md, .windsurf/rules/canon.md, optional ~/CLAUDE.md). NEVER writes to disk — when blocks are missing, returns ready-to-paste install_payload entries the AGENT must offer to the user with EXPLICIT permission before editing files. Reference: ivd/canon_layer.md, ivd/recipes/canon-rules.yaml.

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_rules_installed"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_rootNoPath to repo root (absolute or relative). Defaults to IVD framework root for testing.
install_missingNoHint only. The tool never writes to disk regardless of this flag — the agent must obtain explicit user consent and perform the edits itself.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.2

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it discharges the most important part: 'NEVER writes to disk' plus the consent requirement for any subsequent edit, which pre-empts the dangerous misreading of an install-flavored name. It also discloses that missing blocks yield ready-to-paste install_payload entries. Remaining gaps are the installed/partial-install response shape and behavior on an invalid project_root.

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 core action, then the no-write/consent constraint, then reference paths — a sensible ordering with no filler. The parenthetical file enumeration is long but each entry is operationally relevant to knowing where detection happens.

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 two-parameter detection tool with no output schema and no annotations, the definition covers scope, side effects, result payload, and next-step protocol, plus doc references. It stops short of describing what a positive (installed) result contains or how partial coverage across multiple files is reported, which is the main residual gap.

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%, and the schema already fully documents both project_root (root resolution and default) and install_missing (hint-only, never writes). The description adds nothing parameter-specific beyond restating the no-write guarantee, so the baseline of 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 and resource — detect whether the `<BEGIN-CANON v1.0>`/`<END-CANON v1.0>` rules block is installed — and enumerates the exact instruction files inspected (.cursorrules, .clinerules, CLAUDE.md, .github/instructions/canon.md, AGENTS.md, .windsurf/rules/canon.md, ~/CLAUDE.md). An agent can distinguish this read-only detection tool from canon_check, canon_diff, canon_render, and ivd_judgment_check_installed without opening any 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?

Gives clear downstream procedure: when blocks are missing the tool returns install_payload entries that the agent must offer to the user with explicit permission before editing files. It does not, however, explicitly route against sibling tools (e.g., when to use this check versus canon_check or canon_diff), so the agent must infer that division of labor.

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