Skip to main content
Glama

Suggest a framework-aware fix

generate_ai_fix

Create framework-aware fix alternatives for accessibility issues by passing the issue, element HTML, and CSS framework; get ready-to-paste code for contrast, label, and ARIA repairs.

Instructions

Generate framework-aware fix alternatives for a specific accessibility issue. For color contrast issues, returns 3 alternatives (minimal, brand-aligned, high contrast); brand palette is auto-extracted from the live URL using our scanner if brandColors is omitted. For label/ARIA issues, returns 1-2 alternatives. Each alternative includes ready-to-paste code for the detected framework.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPage URL — also used to auto-extract brand palette for contrast issues if `brandColors` is not provided.
htmlYesThe element's outerHTML — send at most ~600 chars
issueYesIssue object from scan_page (with selector, wcag, impact, message, fix.currentValue), or a plain-text issue description
contextNoParent element outerHTML for context (~400 chars)
frameworkYesCSS framework — use detect_framework first
brandColorsNoBrand palette for brand-aligned suggestions. If omitted on a contrast issue with a `url`, auto-extracted via the scanner.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.0
    • changedInput schema / properties / issue / description
      Previous value: -"Issue object from scan_page (with selector, wcag, impact, message, fix.currentValue)"New value: +"Issue object from scan_page (with selector, wcag, impact, message, fix.currentValue), or a plain-text issue description"
    • changedInput schema / properties / issue / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "string"
      +]
  2. First observedv1.3.1

TDQS

A4.1/5.0
Behavior4/5

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

With annotations present, the description still adds real context beyond them: the count of alternatives returned per issue class, that brand palette is auto-extracted from the live URL when brandColors is omitted, and that output is ready-to-paste code per framework. It doesn't cover error modes or rate/scanning costs, keeping it from 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.

Conciseness4/5

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

Three sentences, front-loaded with the core action and then branching by issue type; each sentence carries information. Minor redundancy between 'brand-aligned' and the brand-palette explanation, but no wasted padding.

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?

No output schema exists, so the description carries the return-value burden and does so well (alternative counts, ready-to-paste code, per-framework targeting). With six schema-documented params and a live-scanning dependency, it is nearly complete, though it omits what happens on a framework/issue mismatch or scanning failure.

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 reinforces the brandColors/url interaction but adds little syntax or format detail beyond what the schema already documents for url, html, issue, context, framework and brandColors.

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 (generate) and resource (framework-aware fix alternatives) scoped to 'a specific accessibility issue,' and further narrows by issue type (color contrast vs label/ARIA). This is enough to separate it from siblings like verify_fix and check_color_contrast 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?

The description makes clear the context in which it applies (contrast vs label/ARIA issues, detected framework) and notes the brandColors/url fallback, so an agent knows when the tool is the right call. It stops short of explicitly naming alternatives or stating when not to use it, so it does not reach 5.

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