Skip to main content
Glama

Propose an edit to one file (published for review)

propose_edit

Applies exact search/replace edits to one existing project file and publishes the result as a reviewable proposal, reporting whether it was applied or needs human acceptance.

Instructions

Applies search/replace edits to a scratch copy of ONE existing text file and publishes the result as a proposal. It never edits the document directly: the change is published for review — if this project has agent auto-accept armed it may apply automatically (the response says status "applied"), otherwise it awaits a human Accept in Galley. Inspect the returned status to know what happened. Each search must match the file's current text exactly once; failures come back as structured data (status: "edit_failed") — refine and retry. To create, rename or delete files, or to change several at once, use propose_files.

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": "<project>",
      "path": "<path>",
      "request": "<request>",
      "edits": "<edits>"
    },
    "name": "propose_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesExact path of the EXISTING file to edit (as listed by list_files).
editsYesSearch/replace blocks, applied in order against the running text.
projectYesThe projectId of the project to work on, as returned by list_projects.
requestYesA short human-readable title for the change (shown in the review card).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2026.11.16
    • addedInput schema / properties / path
      Added value: +{
      +  "description": "Exact path of the EXISTING file to edit (as listed by list_files).",
      +  "maxLength": 1024,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "The projectId of the project to work on, as returned by list_projects.",
      +  "maxLength": 256,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "request",
      -  "edits"
      -]New value: +[
      +  "project",
      +  "path",
      +  "request",
      +  "edits"
      +]
  2. Changed2 schema fields changedv2026.10.2
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / edits / items / additionalProperties
      Removed value: -false
  3. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

No annotations are supplied, and the description carries the full burden well: it discloses that it never edits directly, that the change is published for human Accept, that agent auto-accept may apply it automatically, and that the returned status distinguishes outcomes. It also documents the exact-match-once contract and structured failure mode, which an agent cannot infer from annotations.

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 the core action, followed by the review/auto-accept behavior and then the alternative. Mild redundancy in 'It never edits the document directly: the change is published for review,' which partly repeats the opening sentence, but no sentence is wasted.

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?

For a mutation tool with no annotations and no output schema, the description covers side effects, approval flow, and error handling. Minor gap: it names status values 'applied' and 'edit_failed' but not the pending-review state, and does not otherwise describe the response shape an agent must inspect.

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 100%, so all four parameters are already documented in the schema, including the exactly-once match rule and the request-as-review-card-title meaning. The description restates rather than extends that meaning, so the baseline 3 applies.

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 with scope: applies search/replace edits to a scratch copy of ONE existing text file and publishes the result as a proposal. The 'ONE' constraint and the proposal framing distinguish it immediately from the sibling propose_files.

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?

Explicitly routes away: 'To create, rename or delete files, or to change several at once, use propose_files.' It also gives in-tool guidance for the retry loop on edit_failed. Both when-to-use and when-not-to-use are present.

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