Skip to main content
Glama

Read context pack

read_pack
Read-onlyIdempotent

Reads a stored search_project or related_files result page by pack_id, enabling targeted line- and column-range retrieval for inspection.

Instructions

Reads a stored result page created by search_project or related_files. Use its pack_id; use search_project for evidence or related_files for dependencies when no valid stored result exists. Returns untrusted data up to 1,000 lines or 50,000 characters with trusted continuation or range notes. Protection changes invalidate stored content; selection-only changes retain it with a warning. Ranges and columns are inclusive and 1-based.

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": {
      "pack_id": "<pack_id>"
    },
    "name": "read_pack"
  }
}

Input Schema

NameRequiredDescriptionDefault
pack_idYesSession id returned by search_project or related_files.
end_lineNoLast inclusive 1-based returned-text line; accepts integer or numeric string.
start_lineNoFirst 1-based returned-text line; accepts integer or numeric string.
start_columnNoFirst 1-based Unicode character on start_line; use a returned continuation value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv5.2.5
    • changedInput schema / properties / end_line / oneOf
      Previous value: -[
      -  {
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  {
      -    "pattern": "^0*[1-9][0-9]*$",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / pack_id / description
      Previous value: -"Session id returned by pack_context, search_project, or related_files."New value: +"Session id returned by search_project or related_files."
    • removedInput schema / properties / pack_id / minLength
      Removed value: -1
    • changedInput schema / properties / start_column / oneOf
      Previous value: -[
      -  {
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  {
      -    "pattern": "^0*[1-9][0-9]*$",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / start_line / oneOf
      Previous value: -[
      -  {
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  {
      -    "pattern": "^0*[1-9][0-9]*$",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
  2. Changed4 schema fields changedv5.2.0
    • changedInput schema / properties / end_line / description
      Previous value: -"Last 1-based line, inclusive; integer or numeric string."New value: +"Last inclusive 1-based returned-text line; accepts integer or numeric string."
    • changedInput schema / properties / pack_id / description
      Previous value: -"Session-scoped id returned by pack_context."New value: +"Session id returned by pack_context, search_project, or related_files."
    • addedInput schema / properties / start_column
      Added value: +{
      +  "description": "First 1-based Unicode character on start_line; use a returned continuation value.",
      +  "oneOf": [
      +    {
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "pattern": "^0*[1-9][0-9]*$",
      +      "type": "string"
      +    }
      +  ]
      +}
    • changedInput schema / properties / start_line / description
      Previous value: -"First 1-based line; integer or numeric string."New value: +"First 1-based returned-text line; accepts integer or numeric string."
  3. First observedv5.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses that returned data is untrusted, the result caps (1,000 lines or 50,000 characters), that continuation and range notes are trusted, and the invalidation rule distinguishing protection changes from selection-only changes. These are exactly the behavioral facts an annotated read tool cannot express in structured fields.

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?

Five tight sentences, front-loaded with purpose then routing then return semantics, with no filler. It loses a point only because phrases like 'protection changes' and 'trusted continuation or range notes' are compressed jargon that require a second read.

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?

For a four-parameter read tool with no output schema, the description covers return size limits, trust boundaries, pagination via continuation notes, and staleness behavior — enough to call and interpret results correctly. It does not state what happens when a pack_id is expired versus never existed, a minor gap given the invalidation discussion.

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 coverage is 100% and the schema already says ranges are inclusive, 1-based, and accept integer or numeric strings, so the closing sentence largely restates structured data. 'Use its pack_id' confirms the handle relationship but adds no format or constraint detail beyond the schema. Baseline 3 applies when the schema carries the parameter burden.

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 first sentence names a specific verb and resource — reads a stored result page created by search_project or related_files — which immediately distinguishes it from those sibling read tools. An agent can tell this is a retrieval-by-handle tool rather than a discovery tool without opening any schema.

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 names the triggering input ('use its pack_id') and gives explicit fallbacks: use search_project for evidence or related_files for dependencies when no valid stored result exists. Both the when-to-use and the when-not-to-use are stated, with the alternative tool for each case.

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