Skip to main content
Glama

Check Rule Compliance

check_rule
Read-onlyIdempotent

Checks a code snippet against one named frontend rule using static heuristics and returns findings and verification guidance. Without code, returns manual verification guidance. Use it when the user requests a check of a specific rule or a proposed fix. Results do not establish rendered-state or runtime conformance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoCode to test against the rule. Omit to get manual verification steps.
slugYesRule slug: the kebab-case rule ID, e.g. 'alt-text' or 'doctype'. The ID must identify a rule in the published catalogue.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNo
titleNo
messageNo
analysisNo
fixPromptNo
categoriesNo
checkPromptNo
suggestionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / code / description
      Previous value: -"Code snippet to analyze against the rule (optional)"New value: +"Code to test against the rule. Omit to get manual verification steps."
    • changedInput schema / properties / slug / description
      Previous value: -"The rule's slug (e.g., 'doctype', 'alt-text')"New value: +"Rule slug: the kebab-case rule ID, e.g. 'alt-text' or 'doctype'. The ID must identify a rule in the published catalogue."
  2. First observed

TDQS

A4.3/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 safety is covered. The description adds meaningful behavioral context beyond those: it uses static heuristics, returns findings and verification guidance, and explicitly states that results do not establish rendered-state or runtime conformance. This is valuable limitation disclosure, though no auth or rate-limit context is provided.

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

Conciseness5/5

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

Four sentences, each earning its place: the main operation, the no-code fallback, the usage condition, and the limitation. It is front-loaded with the core behavior and contains no filler or repetition.

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

Completeness5/5

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

With a rich annotation set, 100% schema description coverage, and an output schema that handles return values, the description is complete for correct invocation. It covers the main path, the no-code fallback, usage timing, and key limitations, leaving no critical gap for an agent deciding to call this tool.

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 both parameters are already documented in the schema, including the meaning of omitting code and the slug format. The description reinforces that the rule must be named and that code omission triggers manual guidance, but it adds no syntax or format detail beyond the schema. Baseline 3 is appropriate when the schema carries the parameter burden.

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?

The description names a specific verb and resource: checks a code snippet against one named frontend rule. The scope is tightly constrained to a single rule, which distinguishes it from broader sibling tools like review_code or audit_url. It also states the mechanism, static heuristics, making the purpose unambiguous.

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 condition for use: when the user requests a check of a specific rule or a proposed fix. It also distinguishes the no-code path by returning manual verification guidance. However, it does not explicitly name alternatives or when not to use this tool versus siblings like review_code or audit_url.

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.