Skip to main content
Glama

jade.insert

Insert new text into a file without overwriting existing content—add functions, sections, or cases by anchoring before or after unique text, or append at the end when no anchor is specified.

Instructions

Add text to a file without replacing anything — a new function, a new section, an extra case. Use this for additive work instead of rewriting a surrounding symbol. With no anchor it appends to the end of the file; with one it places the text before or after that anchor, refusing if the anchor is absent or matches more than once. Several additions or edits at once belong in apply.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile to add to.
textYesText to insert.
anchorNoOptional. Exact, unique text to place the insertion beside. Omit to append to the end of the file.
positionNoOptional. "before" or "after" the anchor. Defaults to after.
expectedDigestNoOptional. The digest from the read this edit is based on; the edit is refused if the file changed since, by anyone.
expectedRevisionNoOptional. Revision expected before editing; the edit is rejected if the workspace has moved on. Omit for no precondition.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.10

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses key behaviors: appending with no anchor, before/after placement with an anchor, and refusal when the anchor is absent or matches more than once. It does not discuss output or permissions, but the core failure and placement semantics are well covered.

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 sentences, each earning its place: the core purpose, the when-to-use guidance, and the anchor/precondition behavior. The most important differentiator is front-loaded, and the sibling alternative is neatly at the end.

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?

The description is complete for selecting and invoking the tool in common cases: it explains additive use, anchor behavior, and the key alternative. It does not describe the success response or the digest/revision preconditions in prose, though those are fully covered in the schema. Given the tool's relative simplicity, this is a minor gap.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds behavioral meaning beyond the schema by explaining the interplay between anchor and position, including the append fallback and the refusal on ambiguous anchors. This enriches rather than merely repeats the parameter docs.

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 and resource: "Add text to a file without replacing anything," then gives concrete examples like a new function or section. This clearly distinguishes it from siblings such as jade.replace_text, so an agent can tell them apart immediately.

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?

It explicitly states when to use the tool: "Use this for additive work instead of rewriting a surrounding symbol." It also names the alternative for multi-edit scenarios: "Several additions or edits at once belong in apply." This gives direct routing guidance with no inference needed.

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