Skip to main content
Glama

Ctx Get

ctx_get
Read-onlyIdempotent

Retrieve a stored context chunk by ID and return it byte-identical to what was originally saved.

Instructions

Retrieve a stored chunk, byte-identical to what was originally stored.

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": {
      "chunk_id": "<chunk_id>"
    },
    "name": "ctx_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
chunk_idYesid returned by `ctx_store` in `chunk_ids` (int or its string form), or a `<sha12>#<idx>` ref from the anchor footer
session_idNosession to retrieve from (default: "default"); a chunk of another session is only readable after an explicit ctx_transferdefault

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real value with the 'byte-identical' fidelity claim, but says nothing about behavior when the chunk is missing, expired, or purged.

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

Conciseness4/5

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

One tight, front-loaded sentence with no filler; the core guarantee lands immediately. It is lean to the point of leaving usage and failure behavior unstated, which is a content gap rather than verbosity.

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

Completeness3/5

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

An output schema exists and the input schema documents both parameters plus the cross-session restriction, so the description needn't explain return values. However, the tool is part of a large context-management family and the description offers no routing cues or error semantics, leaving a modest gap for a low-ambiguity tool.

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%, and the schema itself explains chunk_id formats and the default/session-transfer rule, so the baseline is 3. The description adds no meaning beyond the schema for either parameter.

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?

A specific verb ('retrieve') and resource ('stored chunk') with an added fidelity guarantee ('byte-identical to what was originally stored'). It does not distinguish itself from retrieval-adjacent siblings like ctx_search or ctx_verify, so differentiation is left implicit.

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?

The description gives no when-to-use guidance: it never says to prefer this over ctx_search for exact-chunk retrieval, nor mentions the prerequisite (visible only in the schema) that a chunk in another session requires ctx_transfer. Usage must be inferred entirely from the name and schema.

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