Skip to main content
Glama

local_edit

Destructive

Apply small mechanical code changes like docstrings, comments, or renames using a local model. Pass file paths and an instruction; optionally run tests as a gate.

Instructions

Apply a small, fully specified mechanical change with a local model (docstrings, comments, type hints, renames, boilerplate, test scaffolding, applying a decided pattern). Pass paths, not contents: do not Read the files first. gate = commands (argv lists, at most 5, no shell, run with the user's rights: only the project's own tests or linters) that must pass, e.g. [["python","-m","pytest","-q"]]; if they fail after one retry the files are restored and the result is ESCALATE. Returns APPLIED with the diff to review, or ESCALATE. Never for design, debugging or security-sensitive code.

Input Schema

NameRequiredDescriptionDefault
gateNo
pathsYes
instructionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the failure path: gate commands run with the user's rights, are limited to at most 5 argv lists with no shell, and on failure after one retry the files are restored and the result becomes ESCALATE. It also states the return states (APPLIED with diff, or ESCALATE), all of which is critical context for a destructive, non-idempotent mutation.

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-loads the core purpose and every sentence carries information. The gate sentence is a dense run-on stacking parentheticals and semicolons, which slightly hurts scannability, but nothing is wasted.

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 3-param destructive tool with an output schema, the description covers the safety profile, the gating/rollback mechanics, argument shape, and exclusions. An agent has everything needed to invoke it correctly; return values are additionally clarified beyond the schema.

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 description coverage is 0%, so the description must compensate, and it does for gate (argv lists, max 5, no shell, run with user's rights, concrete example) and for paths ('pass paths, not contents'). The instruction parameter is only implicitly characterized via 'fully specified mechanical change', leaving a small gap.

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+resource+scope ('Apply a small, fully specified mechanical change with a local model') and enumerates the qualifying edit types (docstrings, comments, type hints, renames, boilerplate, test scaffolding). It is unambiguous about what kind of work it does, though it never names or contrasts with its siblings local_ask/local_digest.

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?

Gives clear when-not guidance ('Never for design, debugging or security-sensitive code') and workflow direction ('Pass paths, not contents: do not Read the files first'), plus the condition for supplying a gate. It stops short of naming which sibling to use instead for the excluded cases.

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