Skip to main content
Glama

Apply changes

apply_changes
Destructive

Create, edit, or delete files in a project in one commit.

Use this to change a project's code directly. Takes up to 50 file changes and writes them as one commit. An edit replaces exact 'old' text with 'new' text; if any edit does not match, nothing is written and the error names the file. Requires a running dev server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
changesYesAll file changes for the task. Each item is one of: {"path": "app/routes/index.tsx", "content": "<full file>"} writes a whole file (created if missing); {"path": "app/routes/index.tsx", "replacements": [{"old": "...", "new": "..."}]} edits an existing file in place; {"path": "app/components/Old.tsx", "delete": true} deletes a file.
messageNoCommit message for this batch, imperative and under 72 characters. Generated when omitted.
project_nameYesName of the project

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / changes / description
      Previous value: -"All file changes for the task. Each item is one of: {\"path\": \"src/App.tsx\", \"content\": \"<full file>\"} writes a whole file (created if missing); {\"path\": \"src/App.tsx\", \"replacements\": [{\"old\": \"...\", \"new\": \"...\"}]} edits an existing file in place; {\"path\": \"src/old.tsx\", \"delete\": true} deletes a file."New value: +"All file changes for the task. Each item is one of: {\"path\": \"app/routes/index.tsx\", \"content\": \"<full file>\"} writes a whole file (created if missing); {\"path\": \"app/routes/index.tsx\", \"replacements\": [{\"old\": \"...\", \"new\": \"...\"}]} edits an existing file in place; {\"path\": \"app/components/Old.tsx\", \"delete\": true} deletes a file."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already mark destructiveHint=true and readOnlyHint=false; the description adds valuable behavioral context beyond that: atomicity (nothing written if any edit fails), error naming the offending file, the 50-change limit, and the dev-server requirement. No contradiction with annotations.

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?

Four sentences with no filler: purpose, usage, failure semantics, and prerequisite are each covered in one tight sentence. The most important scoping information is front-loaded.

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?

Given full schema coverage, an output schema, and annotations, the description covers prerequisites, limits, atomicity, and failure behavior. Nothing essential for an agent to invoke the tool correctly is missing.

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 the schema fully documents the three change shapes, commit message, and project_name. The description adds behavioral context (exact old-text matching, atomic failure) but no new parameter-level semantics, so baseline 3 is appropriate.

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 ('Create, edit, or delete files in a project') and clearly distinguishes itself from read-only siblings by emphasizing 'one commit' and 'change a project's code directly.' The scope is unambiguous.

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?

Explicitly says 'Use this to change a project's code directly,' which gives a clear when-to-use signal. It also notes a prerequisite (running dev server). It doesn't name alternatives or exclusions, but the context is sufficient for an agent to select it over read_file or deploy.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources