Skip to main content
Glama

Apply Patch

apply_patch

Apply a V4A patch to a Floot project — create and update multiple files in ONE atomic operation. Format: "*** Begin Patch" envelope with "*** Add File: path" (+ prefixed lines) and "*** Update File: path" (hunks: optional "@@ anchor" locator, space-prefixed context, -/+ lines, optional "*** End of File"), then "*** End Patch". Paths follow the Floot item scheme (see read_file). To replace a file wholesale use Add File on its own path; the item's other files (e.g. its .module.css) are kept. This tool does not delete or rename: "*** Delete File:" sections are skipped and listed in the result (delete_file removes files), and "*** Move to:" is rejected (rename_file renames items and rewrites their importers). Every applied patch is recorded in the project history and can be reverted. Keep each patch MODEST (a few files / few hundred lines): chat clients cap per-message output, and a patch cut off mid-way is rejected whole ("missing *** End Patch") — split big changes across several apply_patch calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patchYes
projectIdYes
expected_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Very rich disclosure beyond the annotations: atomicity, that unmatched Delete/Move sections are skipped or rejected rather than applied, that history records and revert is possible, and that truncated patches fail as a whole. The annotations only say readOnly=false/destructiveHint=false/openWorld=false, so this added context is genuinely informative; it stops short of describing the response shape or conflict behavior.

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?

One dense paragraph, but the most decision-relevant facts (verb, atomicity, patch format, then limitations, then size cap) are front-loaded and each sentence carries operational weight; length is justified by the format's complexity, though it could be broken into clearer blocks.

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 complex mutation tool with no output schema, the description covers format, atomicity, failure modes, undo, and size limits, and hints at result content (skipped sections are 'listed in the result'). The remaining gap is the undocumented expected_version parameter and the absence of a conflict/version-mismatch explanation.

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 0% for 3 parameters, and the description thoroughly documents the syntax of the `patch` string value (envelope, Add File/Update File hunks, anchors, End of File) but never mentions projectId or expected_version, the latter being an optimistic-concurrency control an agent could easily mis-set.

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 ('Apply a V4A patch to a Floot project') plus the key scope ('create and update multiple files in ONE atomic operation'), which immediately separates it from single-file siblings like write_file and edit_file.

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 the agent away from the wrong tools: Delete File sections are skipped and delete_file is named as the alternative, Move to is rejected in favor of rename_file, Add File on the same path is given as the wholesale-replace idiom, and oversized changes are told to be split across calls.

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