Skip to main content
Glama

repair_apply_batch

Destructive

Apply repair proposals for one or more issues of a scan run, writing repaired copies and before snapshots without overwriting source files. Use preview-only to review before confirming.

Instructions

Apply repair proposals for one or more issues of a scan run. WRITES DATA: each repair writes a repaired copy plus a before snapshot under .datasentry/repairs/; the source file is never overwritten. D5-08: prefer repair_propose_batch first. preview_only is mandatory: true reviews operations without writing, false applies them. Issues without a proposal are skipped (no_proposal), not failed. Returns applied runs and per-issue errors.

Input Schema

NameRequiredDescriptionDefault
confirmYesmandatory acknowledgement that this call mutates state; the tool writes nothing unless it is true (D5-08, D5-12)
issue_idsNoissue ids to apply (default: all of the run)
scan_run_idYes
source_pathYessource data file
preview_onlyYeswhen true, return proposals without writing any data (D5-08 preview-first)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • addedInput schema / properties / confirm
      Added value: +{
      +  "description": "mandatory acknowledgement that this call mutates state; the tool writes nothing unless it is true (D5-08, D5-12)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / preview_only
      Added value: +{
      +  "description": "when true, return proposals without writing any data (D5-08 preview-first)",
      +  "type": "boolean"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "scan_run_id",
      -  "source_path"
      -]New value: +[
      +  "scan_run_id",
      +  "source_path",
      +  "preview_only",
      +  "confirm"
      +]
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses exactly what is written (repaired copy plus before snapshot under .datasentry/repairs/), that the source file is never overwritten, and that issues without a proposal are skipped (no_proposal) rather than failing. This is rich behavioral context that the destructiveHint alone would not convey.

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?

Front-loaded with purpose and the WRITES DATA warning, and every sentence carries information. Slightly dense with internal D5-08 references that are not self-explanatory, but there is no wasted filler.

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

Completeness5/5

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

For a mutating tool with no output schema, the description covers the write side effects, safety guarantees, alternative workflow, skip semantics, and return shape (applied runs and per-issue errors). Nothing an agent needs to call it correctly is missing.

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 80%, so the schema already documents most parameters. The description adds real meaning for preview_only (true reviews without writing, false applies) and reinforces the confirm acknowledgement gate, going beyond the schema text.

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 (apply), resource (repair proposals), and scope (one or more issues of a scan run). It explicitly distinguishes itself from the sibling repair_propose_batch, so an agent can route correctly without opening either 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?

Explicitly says to prefer repair_propose_batch first (D5-08), naming the alternative and the ordering condition. It does not spell out a clear when-not to apply, but the preview_only guidance covers the dry-run path well.

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