Skip to main content
Glama

Query-relevant project context

project_context

Retrieves relevant excerpts from all live project files for a query, with file paths, line ranges, and heading paths, within a character budget.

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

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. Changed1 schema field changedv2026.10.2
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/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 so thoroughly: it declares read-only status, the budget-limited behavior, that duplicate-path conflicts and over-cap files are skipped and reported in `skipped` with reasons, and that `selectionTruncated` signals dropped chunks. This is unusually rich disclosure of what the caller will and won't get back.

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?

Front-loaded with the core purpose and provenance contract, then the budget/skip caveats; nearly every clause carries information. It is a dense single paragraph with nested parentheticals, which is slightly heavy for a two-parameter tool but not wasteful.

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, yet the description names the returned fields (file path, 1-based line range, heading path) and the two status signals (`skipped`, `selectionTruncated`) an agent needs to interpret a partial result. Nothing essential for correct invocation or result interpretation is missing.

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 meaning the schema lacks: it explains that budget caps excerpt text and connects it to the `selectionTruncated` signal, and clarifies that `query` ranks across the whole project rather than a single file. That is genuine added semantic value beyond the field descriptions.

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 ('Returns the most RELEVANT excerpts across ALL the project's live files for a query') plus the mechanism (lexical ranking over structural chunks) and scope (whole project, live files). An agent can immediately distinguish it from full-file readers like read_file.

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?

Explicitly routes to the sibling tool: 'Use read_file for a complete file,' giving a clear alternative with the condition that selects it. It does not spell out the inverse case (when not to use this tool at all, e.g., when you already know the file path), so it falls just short of a full when/when-not/alternatives statement.

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