Skip to main content
Glama

Read context pack

read_pack
Read-onlyIdempotent

Read stored codebase result pages by pack_id, returning up to 1,000 lines or 50,000 characters with range notes. Use pack_context when no valid stored result exists.

Instructions

Reads a stored result page created by pack_context, search_project, or related_files. Use its pack_id; use pack_context instead 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pack_idYesSession id returned by pack_context, 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. 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."
  2. First observedv5.1.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), so the description adds the non-obvious traits: returned data is untrusted, capped at 1,000 lines / 50,000 characters, continuation and range notes are trusted, and invalidation semantics depend on protection vs selection changes.

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?

Four dense sentences, each carrying distinct information (identity, alternative, return limits, invalidation behavior, indexing convention) with the core purpose front-loaded. No filler.

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?

With no output schema, the description carries the return-value burden and does so: size caps, trusted vs untrusted content, and the continuation mechanism are all disclosed. Combined with full schema coverage, an agent has everything needed to call and interpret this tool.

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 baseline is 3, but the description adds semantics the schema does not state as a whole: ranges and columns are inclusive and 1-based, and it points to the returned continuation value as the intended input for start_column. It does not explain the integer-or-numeric-string duality, which the schema covers.

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 ('Reads a stored result page created by pack_context, search_project, or related_files') and names the sibling it is not, pack_context, plus the condition that selects the alternative. An agent can distinguish it from list_projects/get_tree/get_file 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?

Explicit routing rule: use the pack_id from a prior call, and 'use pack_context instead when no valid stored result exists.' It also warns when stored content is invalidated (protection changes) versus retained (selection-only changes), which tells the agent when a read will fail.

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