Skip to main content
Glama

apply_diagnostic_fix

Destructive

Applies diagnostic modifications using per-file adjacent temporary-file replacement, pre-write drift detection, and in-process best-effort rollback for multi-file writes. Requires explicit confirm: true.

Instructions

Applies diagnostic modifications using per-file adjacent temporary-file replacement, pre-write drift detection, and in-process best-effort rollback for multi-file writes. Requires explicit confirm: true. If baselineCheckId is provided, it must be valid and active in the snapshot store; unknown or expired baselines abort immediately without modifying files. Does not provide persistent crash recovery if the process terminates abruptly.

Input Schema

NameRequiredDescriptionDefault
confirmYes
transactionIdYes
baselineCheckIdNo

Output Schema

NameRequiredDescriptionDefault
codeNo
deltaNo
errorNo
statusYes
messageNo
postCheckIdNo
filesModifiedYes
transactionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A3.9/5.0
Behavior5/5

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

Goes well beyond the annotations (destructiveHint, idempotentHint=false) by disclosing the write mechanism (adjacent temp-file replacement), a pre-write drift check, in-process best-effort rollback, and an explicit limitation that there is no persistent crash recovery. That tells an agent exactly what can be lost and when.

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?

Four sentences, front-loaded with the mutation mechanism before the constraints and caveat. Dense but each sentence contributes; no filler or repetition of the schema.

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?

An output schema exists so return values need no explanation, and the description covers mechanism, atomicity limits, confirmation requirement, and baseline validation for this destructive multi-file write. The main gap is the unexplained transactionId and the absent preview-first routing.

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 0%, so the description carries the burden. It explains confirm (must be true) and baselineCheckId (must be valid/active, else abort with no file modification), but transactionId — a required parameter — is never characterized, leaving one of three params unexplained.

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?

States a specific verb and resource ('Applies diagnostic modifications') and characterizes the operation mechanism. It reads clearly against siblings like preview_diagnostic_fix and discard_diagnostic_fix, though it never explicitly names the apply-vs-preview distinction, leaving the sibling differentiation implicit.

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?

Gives a hard precondition ('Requires explicit confirm: true') and a bail-out rule for invalid baselines, which is real usage context. However, it never states when to pick this tool over preview_diagnostic_fix or after_edit_check, leaving the alternative choice to inference.

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