Skip to main content
Glama

generate_fix

Generates a compliant code patch and diff from source code and UI/UX or backend critique findings to fix identified issues.

Instructions

Given source code and structured findings from critique_ui or critique_backend, generate an updated, compliant code patch and diff.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe original code snippet.
criticYesThe critic type that generated the findings.
filePathNoOptional file path.
findingsYesThe array of CritiqueFinding objects returned by critique_ui or critique_backend.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It does disclose the output form (a code patch and diff), which is useful, but it is silent on whether anything is written to disk, whether filePath causes a mutation, permission requirements, or reversibility.

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?

A single front-loaded sentence that names the inputs, the producing tools, and the output artifact with no filler. Every clause earns its place.

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 no output schema, describing that the tool returns a patch and diff is genuinely valuable, and the input contract is fully covered by the schema. It stops short of clarifying whether filePath triggers a file write or whether the fix is applied automatically.

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 schema already explains code, critic, filePath, and findings. The description reinforces the pairing between findings and the critic type but adds no formatting or syntactic detail beyond the schema; 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?

States a specific verb (generate), a specific artifact (updated, compliant code patch and diff), and names its inputs precisely: source code plus structured findings. It is clearly distinguishable from critique_ui/critique_backend, which produce findings rather than fixes.

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 phrase 'structured findings from critique_ui or critique_backend' establishes the prerequisite workflow step and names the alternatives explicitly, so an agent knows this tool runs downstream of the critique tools. It does not, however, state any when-not condition or what to do if findings are absent.

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

Deploy Server

Other Tools