Skip to main content
Glama

Query-relevant project context

project_context

Search all project files for relevant excerpts with source paths, line ranges, and heading context. Works within a character budget, skips unreadable files, and notes truncated results.

Instructions

Returns the most RELEVANT excerpts across ALL the project's live files for a query (lexical ranking over structural chunks), each with provenance: file path, 1-based line range, and Typst heading path. Budget-limited and read-only: files with duplicate-path conflicts or over the per-file cap are skipped (listed in skipped with a reason), and selectionTruncated reports when relevant chunks did not fit the budget. Use read_file for a complete file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesWhat you are looking for — ranks chunks across the whole project.
budgetNoResponse budget in characters of excerpt text (default 6144).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it does so thoroughly. It states the tool is read-only and budget-limited, explains skip conditions (duplicate-path conflicts, per-file cap), and reports the `skipped` and `selectionTruncated` signals. This is far more than the minimal mutation/read distinction.

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 two dense sentences with no filler. The core purpose and scope are front-loaded, and each additional clause covers an important behavioral caveat or a pointer to the sibling tool. Every sentence earns its place.

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?

There is no output schema, so the description must explain return semantics, and it does: each excerpt has file path, 1-based line range, and Typst heading path; skipped files are listed with reasons; truncation is reported. It also covers budget limits and the read-only nature, making it complete for an agent to invoke correctly.

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 because both parameters are already documented. The description adds meaningful context beyond the schema: it explains the ranking behavior for `query` (lexical ranking over structural chunks) and clarifies that `budget` overflow surfaces as `selectionTruncated`, which is genuinely useful behavioral detail.

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 clearly identifies the specific action (returns relevant excerpts), the resource (all live project files), and the distinguishing mechanism (lexical ranking over structural chunks). It also differentiates itself from read_file by explicitly stating the latter is for a complete file.

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 explicitly tells the agent when to prefer this tool versus an alternative: 'Use read_file for a complete file.' This is a clear when/when-not boundary that helps an agent choose correctly without opening either implementation.

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