Skip to main content
Glama

vfs_mutate

Stage speculative code edits in an in-RAM overlay, keeping disk untouched until commit. Apply replace, insert, slice, or merge patches for validation before writing to disk.

Instructions

Stage a write in the in-RAM Ghost overlay (disk untouched until commit). op=replace_file (default) | replace_node | insert_after | slice_patch | merge_patches (non-overlapping agent patches, unified imports). USE WHEN: applying a speculative code edit. DO NOT USE: for reads, or before causal_flight pre_flight.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opNo
codeNo
pathYes
node_idNo
patchesNo
agent_idNo
end_lineNo
start_lineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the staging semantics (in-RAM overlay, disk untouched until commit) and merge_patches constraints (non-overlapping patches, unified imports). It omits what happens after staging — how/whether the overlay is committed, discarded, or rolled back — and any auth or conflict behavior, so it stops short of a 5.

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?

Telegraphic and front-loaded: purpose first, then op variants, then when/when-not. Every clause carries information and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, 0%-coverage mutation tool with no annotations and no output schema, the description covers purpose, routing, and the op enum but leaves the majority of parameters and the post-staging lifecycle unexplained. Adequate to invoke the common case, incomplete for the full surface.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 8 parameters, so the description must compensate and largely does not. It lists the op enum values and marks replace_file as default, and gives real semantics only for merge_patches; code, path, node_id, patches, agent_id, start_line and end_line are never explained, leaving most parameters undefined in both places.

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+resource ("Stage a write in the in-RAM Ghost overlay") and immediately distinguishes itself from siblings by naming reads (vfs_inspect territory) and the causal_flight pre_flight step as out of scope. An agent can tell this apart from vfs_inspect and causal_flight without opening any schema.

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?

Explicit USE WHEN ("applying a speculative code edit") and DO NOT USE ("for reads, or before causal_flight pre_flight") sections name both the condition and the sibling alternative. This is the strongest form of routing guidance.

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