Skip to main content
Glama

propose_minimal_fix

Generate a minimal, high-confidence patch for a diagnosed test failure, returning a unified diff with explanation, confidence, and risk level.

Instructions

Generate the smallest possible high-confidence patch for a diagnosed root cause. Always prefer minimal edits. Returns a unified diff, explanation, confidence, and risk level. Call diagnose_test_failure first when possible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
git_diffNo
languageNo
diagnosisNoOutput from a previous diagnose_test_failure call. Strongly recommended.
frameworkNo
constraintsNoAny constraints the agent must respect (e.g. 'do not change public API', 'keep existing test structure')
test_outputYes
source_filesYes
root_cause_idNoWhich ranked root cause to fix (1-based). Defaults to 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It discloses the algorithm's preference ('Always prefer minimal edits'), the nature of the output (unified diff, explanation, confidence, risk level), and the contextual requirement of a diagnosed root cause. It does not explicitly state that the tool only proposes a patch and does not modify files, but the name and 'returns a diff' strongly imply that.

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 three short sentences with no filler. It front-loads the core behavior, then the policy, then the return format, and finally the workflow prerequisite. Every sentence earns its place.

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

Completeness2/5

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

The tool is complex: 8 parameters, nested objects, no output schema, and sparse schema descriptions. The description gives a helpful workflow hint and lists returned fields, but it does not explain how to construct the required inputs, how diagnosis and root_cause_id interact, what constraints/git_diff are for, or what the risk level output looks like. Significant gaps remain for an agent to invoke this correctly.

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

Parameters2/5

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

Schema description coverage is only 38%, so the description needed to compensate, but it does not explain the roles of test_output, source_files, git_diff, language, framework, constraints, or root_cause_id. The only semantic hint is that a diagnosis should precede the call, which weakly maps to the `diagnosis` parameter. This is insufficient for an 8-parameter tool with nested objects.

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 opens with a specific verb and resource: 'Generate the smallest possible high-confidence patch for a diagnosed root cause.' It also states the return payload (unified diff, explanation, confidence, risk level) and the core policy ('Always prefer minimal edits'), which clearly distinguishes it from the sibling tools diagnose_test_failure and assess_fix_safety.

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 explicitly instructs 'Call diagnose_test_failure first when possible', giving a clear workflow prerequisite and indicating this tool consumes an earlier diagnosis. It does not mention assess_fix_safety or provide exclusion criteria, but the sequencing guidance is concrete and useful.

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