Skip to main content
Glama

suggest_fix

Generates copy-pasteable code fixes for validation issues like shadow-dom or token-fallback. Provide issue type, kind, and original code to receive a corrected snippet with explanation.

Instructions

Generates concrete, copy-pasteable code fixes for validation issues. Pass the issue type (shadow-dom, token-fallback, theme-compat, method-call, event-usage, specificity, layout), the specific issue kind, and the original code — returns a corrected code snippet with an explanation. NOTE: styling_preflight and validate_css_file now embed fixes inline in each issue — only call suggest_fix directly for issues from other validators or when you need a fix for code not already validated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesThe category of validation issue.
issueYesThe specific issue kind (e.g. "descendant-piercing", "missing-fallback", "hardcoded-color", "property-as-method", "react-custom-event").
originalYesThe original problematic code.
tagNameNoOptional tag name of the component.
partNamesNoOptional list of CSS part names exposed by the component.
propertyNoOptional CSS property name for token/theme fixes.
memberNameNoOptional method/property name for method call fixes.
suggestedNameNoOptional corrected name for typo fixes.
eventNameNoOptional event name for event usage fixes.
tokenPrefixNoOptional token prefix from the component library (e.g. "--hx-", "--fast-", "--md-"). When provided, suggested replacement tokens use this prefix. Get this from diagnose_styling.
Behavior4/5

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

The description discloses that the tool returns a corrected code snippet with an explanation, adding behavioral context beyond the input schema. No annotations are present, so the description carries full responsibility; it is mostly transparent about the tool's output but does not mention potential side effects or authorization needs.

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?

The description is concise, consisting of two main sentences and a note. It is front-loaded with the core purpose and efficiently uses each sentence to convey key information without redundancy.

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?

Given the tool's complexity (10 parameters, 3 required) and lack of output schema, the description adequately explains its role and integration with other tools. It could be improved by providing an example output or more detail on the fix format, but the current description is sufficient for selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, providing baseline 3. The description adds value by explaining the purpose of optional parameters (e.g., 'Get this from diagnose_styling' for tokenPrefix) and contextualizing required parameters beyond the schema names.

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 clearly states the tool generates concrete, copy-pasteable code fixes for validation issues, listing specific issue types and required inputs. It effectively differentiates from similar tools by noting that styling_preflight and validate_css_file embed fixes inline.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is provided on when to use the tool (for issues from other validators or code not already validated) and when not to (for styling_preflight and validate_css_file which embed fixes). The description includes a clear note with directives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bookedsolidtech/helixir'

If you have feedback or need assistance with the MCP directory API, please join our Discord server