Skip to main content
Glama

autopilot_apply_fixes

Apply verified line-level code fixes to source files with backups, project-scope checks, and automatic rollback if compile errors increase.

Instructions

Apply a list of fixes to source files safely. Each fix specifies a file path, line number, the original line content (for verification), and the replacement. Files are backed up before modification and scope-checked against the project path.

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": {
      "project_path": "<project_path>",
      "fixes": "<fixes>"
    },
    "name": "autopilot_apply_fixes"
  }
}

Input Schema

NameRequiredDescriptionDefault
fixesYesList of fixes to apply
project_pathYesAbsolute path to .xcodeproj or .xcworkspace (used for scope validation)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and does disclose two important traits: files are backed up before modification, and paths are scope-checked against the project path. It does not say whether the batch is atomic (partial application on mid-list failure), what happens when verification of original_line fails, or what the response reports.

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?

Two short sentences with the safety guarantees front-loaded right after the action. No filler, no restating of the title, and the fix anatomy is described in one compact clause.

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

Completeness3/5

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

For a 2-parameter tool with a fully described schema and no output schema, the description covers the action and the safety model adequately. However, the failure contract — what a verification mismatch does, whether patches are applied all-or-nothing, and what the caller gets back — is absent, and with no annotations and no output schema nothing else supplies it.

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 coverage is 100%, so every parameter and nested fix field is already documented in the schema. The description restates the fix shape and the purpose of original_line (verification) and project_path (scope check), which adds framing but little meaning beyond the schema text. Baseline 3 applies.

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 ('Apply a list of fixes to source files') and adds a qualifier ('safely') that frames the operation. Sibling tools are build/test/clean style operations, and this one is clearly the mutation path, though the description never names an alternative to contrast with.

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 only implied: the agent can infer this is the tool that writes fixes into files, but there is no statement of when it should be chosen over siblings or what precondition should exist (e.g. after a build or analysis surfaced errors). No exclusions or prerequisites are given.

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