Skip to main content
Glama

local_edit

Delegate mechanical code edits, such as renames or docstrings, to a local model that applies them and returns only a compact receipt, rolling back changes that fail the project gate.

Instructions

Delegate a MECHANICAL code edit to the local model. USE THIS INSTEAD OF Read+Edit whenever the change is well-specified and does not need cross-file reasoning: renames, docstrings and comments, type annotations, adding a logging line, applying a pattern you already decided on, boilerplate, test scaffolding, formatting fixes.

Do NOT read the files first -- that spends the tokens this tool exists to save. Pass file paths inside instruction and let the local model read them.

The edit is applied to the working tree only if it passes the project's verification gate; otherwise it is rolled back and you get an ESCALATE.

Args: workspace_root: Absolute path to the repository root. instruction: Self-contained task, naming the exact files and the exact change. The local model sees nothing else -- no conversation history. tier: "fast" for mechanical/high-volume work, "deep" for edits needing real code reasoning (slower, larger model).

Returns: A receipt: files changed with line counts, gate verdict, timing. Never file content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tierNofast
instructionYes
workspace_rootYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.9/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so: edits apply to the working tree only if they pass a verification gate, otherwise they are rolled back and an ESCALATE is returned, and the response is a receipt with no file content. This discloses mutation semantics, failure behavior, and return shape that the schema does not.

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 purpose, then clearly delimited USE / DO NOT / Args / Returns blocks, so an agent can scan it quickly. Slightly long, and the Returns block partially restates the output schema, though the 'Never file content' note still adds value.

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?

An output schema exists, yet the description still summarizes the return as a receipt rather than file content, which is exactly the disambiguation an agent needs. Combined with tier guidance and the escalation path, nothing required to invoke this correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate and does: `workspace_root` is an absolute repo-root path, `instruction` must be self-contained because the local model sees no conversation history, and `tier` maps 'fast' to mechanical/high-volume vs 'deep' to reasoning-heavy edits. Every parameter gains meaning beyond the bare schema.

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 and resource — 'Delegate a MECHANICAL code edit to the local model' — and immediately contrasts it with the Read+Edit path an agent would otherwise use. The scope qualifier 'mechanical' plus the enumerated change types make the purpose unambiguous without opening the schema.

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

Usage Guidelines5/5

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

Explicit when-to-use (renames, docstrings, type annotations, logging lines, boilerplate, formatting), an explicit negative constraint ('Do NOT read the files first'), and a boundary condition (no cross-file reasoning needed). It even tells the agent how to route: pass paths inside `instruction`.

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

Deploy Server

Other Tools