Skip to main content
Glama

Pack relevant context

context_pack
Read-onlyIdempotent

Retrieve a token-budgeted pack of relevant code excerpts with path:line citations and matching project memories for a concrete question, so you can avoid broad greps and reading whole files.

Instructions

Given a concrete question, return a token-budgeted pack of the most relevant code excerpts (with path:line citations) plus matching project memories. Use this BEFORE broad greps or reading whole files; it cuts token use and round trips.

Input Schema

NameRequiredDescriptionDefault
queryYesConcrete question or identifiers, e.g. "where is the OAuth token refreshed".
max_filesNo
budget_tokensNo
include_memoriesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, and the description adds real behavioral context: the output is budgeted, includes path:line citations, and may include memories. It does not mention what happens when the budget is exhausted or how results are ranked/truncated, so it stops short of full disclosure.

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?

Two tight sentences, front-loaded with what the tool returns and followed by the when-to-use cue. Every clause carries information; nothing is redundant.

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?

There is no output schema, and the description does its part by characterizing the return value (excerpts with citations and memories). However, for a 4-parameter tool with three undocumented parameters, an agent still lacks the knobs' semantics, so the definition is not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 25% — only `query` is documented. The description never explains `max_files`, `budget_tokens`, or `include_memories`; "token-budgeted" hints at budget_tokens but gives no defaults, bounds, or effect. It fails to compensate for the low coverage.

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?

States a concrete verb and resource: returns a token-budgeted pack of relevant code excerpts with path:line citations plus matching project memories. That is far more specific than any sibling, but it never names a sibling (e.g. project_brief or recall) to contrast against, so the differentiation is implied rather than explicit.

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?

Gives clear positive guidance: "Use this BEFORE broad greps or reading whole files." It explains the tradeoff (token use and round trips). It does not say when not to use it or how it relates to recall/project_brief, which is the remaining gap.

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