Skip to main content
Glama

insert_content

Insert text at a chosen start, end, or character position in a document, with position validation and a preview before applying the change.

Instructions

Insert content at a specific position with validation and preview

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspace": "<workspace>",
      "documentId": "<documentId>",
      "position": "<position>",
      "text": "<text>"
    },
    "name": "insert_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to insert
positionYes"start", "end", or character position
workspaceYes
documentIdYes
expectedLineBeforeNoOptional: The exact line expected before the insertion point for position validation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, and it is thin: it never says whether insertion shifts existing content, whether the operation is reversible, or what permissions are needed. The word "preview" is especially confusing for a mutation tool — is a preview returned, or does insertion happen immediately? — and no preview parameter exists to control it.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence with no filler is structurally efficient, but it is under-specified rather than genuinely concise — the brevity comes at the cost of the details an agent needs.

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

Completeness2/5

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

For a five-parameter write tool with no annotations and no output schema, the definition is too sparse: it omits the side effects of insertion, the meaning of the validation flow, and the fate of the "preview." An agent could invoke it but would be guessing about behavior.

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 coverage is 60%, leaving workspace and documentId undocumented, and the description does not compensate for them. It references position and gestures at validation (mapping loosely to expectedLineBefore) but adds no format or constraint detail beyond the schema, and its "preview" claim corresponds to no parameter at all.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ("Insert content") plus a scoping detail ("at a specific position"), so an agent can tell it apart from delete_content and replace_content by implication. It stops short of explicitly naming those siblings, but the operation itself is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to choose insert over replace_content or delete_content, nor any prerequisite or context about what kind of document/workspace is being modified. The only guidance-like phrase is "with validation and preview," which hints at the expectedLineBefore safety check but never explains it.

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