Skip to main content
Glama

select_context

Select source spans from files or globs to return token-budgeted, file:line-labeled context for coding queries.

Instructions

Select source spans from explicit files and/or include globs for a query. Context is capped at 1,500 tokens including file:line labels; metadata costs extra. Files accept path:start-end ranges. Range-only reads return ordered whole-line prefixes and continuation.files; whole-file or mixed scopes are ranked. outline returns a definition index. Each call is independent: retain prior context and compare source_fingerprint across continuations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNo
queryYes
includeNo
outlineNo
advancedNo
budget_tokensNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the 1,500-token cap (plus metadata cost), continuation semantics via continuation.files, the stateless nature of each call, and the need to compare source_fingerprint. This is substantive behavioral context an agent cannot get from structured fields alone, though reusability/caching caveats are not addressed.

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?

The purpose is front-loaded in the first clause, and the following sentences are dense but each carries distinct operational information (token cap, range reads, outline, continuations). No filler, though the jargon-heavy phrasing demands re-reading in places.

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, so return-value explanation is waived, and the description covers the cap, ranges, and continuation model for a fairly complex tool. Still missing is guidance on sibling selection and any meaning for query/advanced, so it is adequate but not fully complete for a 6-parameter tool with a nested object.

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 0%, so the description must compensate, and it partially does: files accepts path:start-end ranges, include takes globs, and outline returns a definition index (matching the 1500 default of budget_tokens). However, query, advanced (a nested free-form object), and the budget_tokens relationship remain unexplained, leaving half the parameters opaque.

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?

The description states a specific verb ("Select") and resource ("source spans") with the input sources (explicit files and/or include globs). It is reasonably distinguishable from siblings like find_files or find_evidence, though it never names an alternative to contrast against.

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?

There is no explicit when-to-use or when-not-to-use guidance, nor any routing to the sibling tools (find_usages, find_evidence, find_symbols). The description explains mechanics (ranges, outline, continuations) but never says in what situation an agent should pick this tool over the others.

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