Skip to main content
Glama

expand

Read-onlyIdempotent

Recover text omitted by trimming: provide the marker id and, optionally, a line range or JSON path to restore the hidden content.

Instructions

Get back text that a trim omitted. Give the id and, ideally, the line range or JSON path from the marker.

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": {
      "id": "<id>"
    },
    "name": "expand"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe id printed in an omitted-lines marker or receipt.
pathNoFor JSON inputs: a path such as $.items[3].
linesNoSTART-END, as printed in the marker.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-open-world behavior. The description adds useful context beyond annotations: the id must come from an omitted-lines marker or receipt, and the optional path/lines should be taken from that marker, tying expansion to prior trim output.

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?

Two short sentences with the core action front-loaded and no wasted wording. The optional-parameter guidance is compact and useful.

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?

This is a simple three-parameter read tool with a rich output schema and full parameter descriptions. The description covers what it does and how to call it adequately; only edge-case behavior such as stale or invalid ids is left unstated.

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?

Schema description coverage is 100%, so the input schema already documents id, path, and lines. The description adds a mild prioritization hint ("ideally" the line range or JSON path) and that values come from the marker, but does not add syntax or format detail beyond the schema.

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 states a specific verb and resource: "Get back text that a trim omitted." It clearly positions the tool as the recovery counterpart to the trim family, though it does not name a specific sibling tool.

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

Usage Guidelines3/5

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

It gives invocation guidance ("Give the id and, ideally, the line range or JSON path from the marker") and implies use after a trim marker, but it does not explicitly state when to use this versus alternatives or when not to use it.

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