Skip to main content
Glama

Get Rule Fix

fix_rule
Read-onlyIdempotent

Returns step-by-step remediation guidance and priority for one named frontend rule. Use it when the user requests implementation or fix instructions for a known issue. Optional codeSnippet provides context; the tool does not edit files or apply changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesRule slug: the kebab-case rule ID, e.g. 'alt-text' or 'doctype'. The ID must identify a rule in the published catalogue.
codeSnippetNoCode that violates the rule, so the fix guidance can reference it.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNo
titleNo
messageNo
priorityNo
fixPromptNo
codeContextNo
suggestionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / codeSnippet / description
      Previous value: -"Optional: code or HTML snippet for context-aware fix suggestion"New value: +"Code that violates the rule, so the fix guidance can reference it."
    • changedInput schema / properties / slug / description
      Previous value: -"The rule's slug"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.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description's added value is resolving the misleading 'fix_rule' name by stating explicitly that it 'does not edit files or apply changes' and that codeSnippet is context-only, which tells the agent this is purely advisory despite the mutation-flavored name.

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?

Three short sentences with zero filler: purpose first, then the usage trigger, then the non-mutation boundary and optional parameter note. Every sentence earns its place and the key information is front-loaded.

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 a full output schema, complete annotations, and 100% parameter documentation, the description only needs to cover purpose, trigger, and the advisory-only nature, all of which it does. Minor gap: it does not mention the priority field's semantics or any catalogue-membership failure mode beyond the schema's slug note.

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 documents slug (kebab-case catalogue ID) and codeSnippet (violating code for context). The description's note that codeSnippet is optional and provides context only restates the schema, so baseline 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?

The description states a specific verb and resource: it 'returns step-by-step remediation guidance and priority for one named frontend rule.' That output type (remediation steps + priority) is distinct from siblings like explain_rule (explanation), check_rule (evaluation), and get_rule (raw data), so an agent can route to it without opening a 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?

It gives a clear positive trigger ('when the user requests implementation or fix instructions for a known issue') and an implicit exclusion ('for a known issue' implies this is not for discovery). No sibling is named as an alternative, so it falls short of the explicit when/when-not/alternative bar.

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.