Skip to main content
Glama

buggy_repair

Prove a defect in a Python function, generate candidate fixes and verify each by execution, returning a verified, overfit or rejected verdict with evidence plus a patch to review.

Instructions

Prove a defect and then propose fixes, each verified by execution: does it parse, does the proven trigger stop failing, does anything that worked change, and do other inputs of the same shape get fixed too. Verdicts are 'verified', 'overfit' or 'rejected', each with the evidence. Nothing is written to the file. Show the user a verified patch and let them decide; apply it yourself only if they agree.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "function": "<function>",
      "file": "<file>"
    },
    "name": "buggy_repair"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesPath to the Python file, absolute or relative to cwd.
budgetNoInputs to execute before giving up. Default 300.
timeoutNoSeconds allowed per call. Default 2.
functionYesFunction name. Use a dotted name for a class member, e.g. 'Cart.total'.
preconditionsNoPreconditions as PYTHON expressions over the parameter names, e.g. 'budget > 0'. For an instance method the constructor's parameters are in scope too. Inputs that fail these are skipped, so they also decide which inputs a fix is allowed to change.
postconditionsNoPostconditions as PYTHON expressions. 'result' is the return value, e.g. 'result >= 0'. A condition that cannot be evaluated is reported as a warning, never silently skipped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations present the description carries the full burden, and it does substantial work: it discloses the read-only contract ('Nothing is written to the file'), the three-way verdict taxonomy ('verified', 'overfit', 'rejected') with attached evidence, and that unevaluable postconditions surface as warnings rather than being skipped. That is exactly the kind of non-obvious behavior an agent needs before calling a tool that inspects and mutates user code. It does not discuss cost, runtime, or what happens on budget exhaustion beyond the schema default.

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?

The core action is front-loaded in the first clause, and the four sentences each carry distinct information (what it does, how it grades, side-effect status, consent workflow). The opening sentence is long and packs a four-part verification list inline, which slightly hurts scanability. No sentence is filler.

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?

For a six-parameter tool with no output schema, the description compensates by describing the return taxonomy and evidence attachment, and it clarifies the dry-run/consent contract. The main remaining gap is what the evidence for each verdict actually contains, though with 100% schema coverage and no output schema the omission is defensible. An agent has enough to call this correctly and to know what to do with the result.

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 and the schema already explains preconditions, postconditions, budget, and timeout. The description reinforces the role of preconditions as the boundary of what a fix may change, but that same point is already stated in the schema, so the added meaning is marginal. No extra syntax, naming, or format detail is supplied beyond structured fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific two-stage verb chain ('Prove a defect and then propose fixes') against a named resource (a function in a Python file), plus the verification criteria used to grade a fix. An agent can tell this is the fix-generation/verification tool rather than a scanner or investigator. It stops short of 5 because it never names a sibling (e.g. buggy_investigate) it should be preferred over.

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

Usage Guidelines3/5

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

Usage is implied through the required evidence (trigger, regressions, generalization) and through the closing workflow instruction to show a verified patch before applying it. There is no explicit statement of when to reach for this tool instead of buggy_investigate or buggy_recheck, and no preconditions such as needing a reproduced defect first. The apply-only-with-consent rule is genuinely useful guidance but is about the tail of the workflow, not tool selection.

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