Skip to main content
Glama

jade.apply

Apply multiple code edits as one atomic operation: all succeed or none. Validate anchors upfront, format files, and run a single end-to-end validation to prevent partial changes.

Instructions

Apply several edits as one atomic unit: all land or none do. Ops: replace_text, replace_range, replace_symbol, delete_symbol, insert. Anchors are validated before anything is written, touched files are formatted, and one validation runs at the end instead of one per edit. Prefer this over several single edits when changing more than one site.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
checkNoRun one validation after all edits: build, typecheck, tests (the edited files' tests), or impact (those plus tests of callers of touched declarations).
editsYesEdits to apply in order.
formatNoFormat touched files afterwards (default true).
expectedRevisionNoRevision expected before editing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.10

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden of explaining behavioral characteristics. It does so by disclosing atomicity (all land or none), pre-validation of anchors before writes, auto-formatting of touched files, and consolidated validation at the end. This is substantially more useful than a bare 'apply edits' statement, though it does not explicitly address failure atomicity after the final validation or error return formats, which would make it complete.

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?

Three tightly scoped sentences: atomicity, supported ops, behavior, and usage guidance. Each sentence earns its place with the most important information (atomic unit) front-loaded. There is no repetition or fluff; the description has high information density.

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 tool with nested edits arrays and multiple op-specific fields, the description covers the key contextual points an agent needs before calling: atomicity, validation, formatting, and when to use it. The schema covers parameter details and the output is not specified, but the description could have briefly noted how conflicts like 'expectedRevision' or 'expectedDigest' affect overall behavior. Still, it is sufficient for most correct invocations.

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 describes all parameters with 100% coverage, so the baseline is 3. The description does not clarify parameter semantics beyond the schema; it reiterates the operation names (which are also in the schema's 'op' description) but does not add guidance on when to use each op or their dependencies. It therefore adds no real semantic value over the already-detailed schema.

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 opens with a specific verb ('Apply') and resource ('several edits'), immediately stating the core operation: batching edits into an atomic unit. It enumerates the exact operations supported (replace_text, replace_range, replace_symbol, delete_symbol, insert), which clearly differentiates it from sibling single-edit tools like jade.replace_text and jade.insert. The 'one atomic unit' phrasing adds essential semantics not present in the tool name.

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?

The final sentence gives explicit routing guidance: 'Prefer this over several single edits when changing more than one site.' This tells the agent when to choose this tool over the single-edit siblings, and indirectly the when-not case (single edits are for single-site changes). No important usage condition is left implicit.

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