Skip to main content
Glama

Read context pack

read_pack
Read-onlyIdempotent

Read a selected line range from a session pack to retrieve only the needed code context, minimizing token usage.

Instructions

Read a 1-based line range from a pack created by this server session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pack_idYesSession-scoped id returned by pack_context.
end_lineNoLast 1-based line, inclusive; integer or numeric string.
start_lineNoFirst 1-based line; integer or numeric string.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds meaningful behavioral context: lines are 1-based and the pack is session-scoped, which prevents an agent from attempting to read arbitrary or stale packs.

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?

The description is a single, information-dense sentence with no filler. The most important scoping facts—1-based line range and session-created pack—are front-loaded.

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 simple read operation with full schema coverage and strong annotations, the description is sufficiently complete. It could mention return format or error behavior, but these are not critical for an agent to select and invoke the tool correctly.

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 pack_id, start_line, and end_line are already well documented with types, constraints, and the integer-or-string alternatives. The description adds no parameter-specific semantics beyond this, so the baseline of 3 applies.

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 description states a clear verb ('Read'), a specific resource ('a pack created by this server session'), and a precise scope ('1-based line range'). This distinguishes it from sibling tools like pack_context, which creates packs, and get_file, which reads files.

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

Usage Guidelines4/5

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

The description implies when to use it: after a pack has been created by the current session, and the parameter schema reinforces this by noting pack_id is 'returned by pack_context'. It does not explicitly name alternatives or exclusions, but the context is clear enough for an agent.

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