Skip to main content
Glama

Apply Patch

apply_patch

Apply a V4A patch to a Floot project — create, update, and delete multiple files in ONE atomic operation. Format: "*** Begin Patch" envelope with "*** Add File: path" (+ prefixed lines), "*** Update File: path" (hunks: optional "@@ anchor" locator, space-prefixed context, -/+ lines, optional "*** End of File"), "*** Delete File: path", then "*** End Patch". Paths follow the Floot item scheme (see read_file). To replace a file wholesale use Add File on its own — Add OVERWRITES. Never Delete+Add the same path: Delete is item-scoped (deleting components/X.tsx deletes the whole item, its .module.css included), so it is both unnecessary before an Add and destructive to the siblings. Move to: is not supported — to RENAME, Add File at the new path and Delete File the old one. 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

TDQS

A4.3/5.0
Behavior5/5

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

The description goes far beyond the sparse annotations (readOnlyHint=false, openWorldHint=false, destructiveHint=false) by disclosing atomicity, the exact patch format, the destructive nature of Delete (item-scoped, removes siblings), the overwriting behavior of Add, the absence of Move support, and the failure mode when a patch is cut off (entire patch rejected). It also provides the modesty constraint. This richly explains behavior beyond what the annotations indicate.

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?

The description is long but dense and logically structured: purpose first, then the format specification, followed by critical usage warnings and size guidance. Every sentence contributes useful information, and the front-loading makes the core purpose clear immediately. The length is justified by the complexity of the tool (multiple operations, atomic semantics, subtle pitfalls), though a brief example or more compact phrasing might improve scannability.

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?

Given the complexity of the tool (complex patch format, atomic multi-file operations, destructive behavior, path scheme), the description covers most essential aspects: the envelope format, operation types, path resolution, destructive warnings, rename workaround, and size constraints. It stops short of explaining the expected_version parameter and does not detail success/failure responses beyond the 'missing *** End Patch' rejection. It also omits any mention of rollback or atomicity enforcement outcome. For a tool of this complexity, these gaps are notable but not critical, so a 4 seems appropriate.

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?

The schema has 0% description coverage for all three parameters: patch, projectId, expected_version. The description provides a thorough explanation of the patch string format, including envelope markers and line conventions, which is highly valuable. However, it does not explain projectId (though its meaning is likely clear from context) nor expected_version (which appears to be a version-check parameter but is never mentioned). With a zero-coverage schema, the description should compensate for all parameters, and it falls short for two of the three.

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?

The description immediately states the action ('apply a V4A patch'), the resource ('a Floot project'), and the capability ('create, update, and delete multiple files in ONE atomic operation'). It also names the patch format and lists the exact operations, which clearly distinguishes it from sibling tools like edit_file, delete_file, or write_file, which handle single files or different operations.

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?

The description provides explicit guidance on when to use specific operations within the patch (e.g., Add File for wholesale replacement, Delete for item-scoped removal), and warns against combining Delete+Add unnecessarily. It also explains the unsupported 'Move to' operation and how to rename instead, and advises splitting large changes. However, it does not explicitly contrast apply_patch with single-file tools like edit_file or write_file, so the selection criterion for when to prefer this multi-file tool over those is only implied.

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.

TDQS

A3.6/5.0
Disambiguation4/5

Tools are mostly distinct, but there is some overlap among file-modifying tools (edit_file, write_file, apply_patch) and between run_code_in_vm and run_code_in_browser. Detailed descriptions and clearly scoped use cases help agents select correctly.

Naming Consistency4/5

Most tools follow a verb_noun snake_case pattern (create_project, list_files, execute_sql), but a few deviate (apply_patch, card_upload_asset, run_code_in_vm). Overall readable and predictable, with only minor inconsistencies.

Tool Count2/5

With 46 tools, the server exceeds the typical well-scoped range and approaches the extreme threshold. While the broad scope of a full development platform justifies many tools, this count may overwhelm agents and increase misselection risk.

Completeness4/5

The tool surface covers the full development lifecycle: project creation, file operations, database management, resource provisioning, deployment, testing, and debugging. Minor gaps exist (e.g., no delete_project or checkpoint management), but core workflows are well-supported.

Resources