Skip to main content
Glama

retoken_retrieve

Read-onlyIdempotent

Retrieve the full original of shortened or elided tool output by handle, with optional literal pattern search or line-range filters to read only the needed lines.

Instructions

Read the saved original when a ReToken marker indicates that lines you need were elided. Skip retrieval if the visible output answers the question. Pass the handle alone for the original text, search for matching lines, or request a line range. Results over 80000 UTF-8 bytes are cut and followed by a notice. Narrow the search or range to read more. A malformed, unknown, or expired handle returns a tool error: check the marker, then rerun the original command if safe and needed.

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": {
      "handle": "<handle>"
    },
    "name": "retoken_retrieve"
  }
}

Input Schema

NameRequiredDescriptionDefault
handleYesCopy the handle from the ReToken marker, including ccr: and all 64 lowercase hexadecimal digits.
patternNoCase-insensitive literal substring, e.g. ERROR. A nonempty pattern searches all lines and overrides both line bounds. Matches include their original line numbers.
end_lineNoLast line to include. Defaults to the last available line and is capped there.
start_lineNoFirst line to include, counting from 1. Defaults to the first line.

Output Schema

NameRequiredDescriptionDefault
textYesOriginal text, a labeled line range, or numbered search hits with a match count. No matches and out-of-range requests return an explanatory text result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.3.1
    • changedInput schema / properties / end_line / description
      Previous value: -"Last line to return (inclusive, optional)"New value: +"Last line to include. Defaults to the last available line and is capped there."
    • changedInput schema / properties / handle / description
      Previous value: -"The ccr:... handle from the marker"New value: +"Copy the handle from the ReToken marker, including ccr: and all 64 lowercase hexadecimal digits."
    • changedInput schema / properties / pattern / description
      Previous value: -"Return only lines containing this text, case-insensitive (optional)"New value: +"Case-insensitive literal substring, e.g. ERROR. A nonempty pattern searches all lines and overrides both line bounds. Matches include their original line numbers."
    • changedInput schema / properties / start_line / description
      Previous value: -"First line to return (1-based, optional)"New value: +"First line to include, counting from 1. Defaults to the first line."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "text": {
      +      "description": "Original text, a labeled line range, or numbered search hits with a match count. No matches and out-of-range requests return an explanatory text result.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "text"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.3.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), yet the description adds real behavioral facts the annotations cannot: an 80000 UTF-8 byte truncation ceiling with a following notice, how to work around it, and that malformed/unknown/expired handles surface as tool errors. This is exactly the beyond-annotation context the dimension rewards.

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?

Five dense sentences, front-loaded with purpose and the skip condition, then modes, then limits, then failure handling. No sentence is redundant with the title or schema, and the ordering mirrors how an agent would decide whether and how to call it.

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

Completeness5/5

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

The tool is moderately complex (4 params, error paths, truncation), but the description covers trigger, opt-out, mode selection, output limits, and error recovery, while the output schema handles return-value detail. Nothing an agent needs to invoke it correctly is missing.

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 per-parameter meanings are already documented and the baseline is 3. The description nonetheless adds cross-parameter semantics the schema states only in fragments: the three distinct invocation modes (handle alone vs. pattern search vs. line range) and the need to narrow the range when truncated.

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 and resource ('Read the saved original') and pins the trigger condition precisely: 'when a ReToken marker indicates that lines you need were elided.' An agent can immediately tell this is a follow-up retrieval tool tied to an elision marker rather than a general file reader.

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?

Gives explicit when-to-use ('when a ReToken marker indicates lines were elided'), explicit when-not ('Skip retrieval if the visible output answers the question'), and mode selection guidance ('Pass the handle alone... search... or request a line range'). It also prescribes a recovery path for failed handles, so the agent is never left inferring next steps.

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

Deploy Server

Other Tools