Skip to main content
Glama

query

Runs tier-aware codebase lookups through manifest, keyword, then vector tiers, escalating only when earlier signals are weak to return relevant project context at lower cost.

Instructions

Tier-aware project query. Cheaper than `search_codebase`.

Routes through L0 (manifest), then L1 (BM25), then L2 (vector embeddings),
escalating only when the previous tier yields a weak signal.

Args:
    text: Free-form query.
    intent: "overview" | "lookup" | "semantic" | "deep".
            - overview: L0 only — paths and symbols. Always sub-second.
            - lookup:   L0 + L1 — keyword/lexical search.
            - semantic: L0 + L1 + L2 — pulls in embeddings if signal is weak.
            - deep:     L0 + L1 + L2 — relaxed thresholds, more results.
    n_results: Final number of merged hits to return (1-50).

Input Schema

NameRequiredDescriptionDefault
textYes
intentNolookup
n_resultsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full load, and it discloses the escalation policy, latency expectations for the cheapest tier, and that fallback tiers only engage on weak signal. The read-only nature is implied but never stated outright, and nothing is said about needing a built index before queries return useful results.

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 one-line value proposition and the sibling comparison, then structured Args. The repeated 'L0 + L1 + L2' listing for semantic and deep is slightly redundant, but nothing is wasted overall.

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?

An output schema exists, so return values need not be explained. The description covers cost, tiering, and every parameter, which is what an agent needs to invoke it. It stops short of noting the prerequisite that the codebase must be indexed (a sibling tool exists for that), which is the one operational detail an agent could trip on.

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

Parameters5/5

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

Schema coverage is 0% and the schema has no enum on `intent`, yet the description documents all three parameters: free-form text, the four valid intent strings with their tier mappings and behavioral differences, and the 1-50 range for n_results. This is materially more information than the schema conveys.

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 names the resource (project query) and its distinguishing mechanism (tiered L0/L1/L2 retrieval), and explicitly positions it against a sibling with 'Cheaper than `search_codebase`.' It is clear what the tool does, though the generic name 'query' means the description has to carry the identity, which it does adequately.

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?

It gives an explicit cost comparison against search_codebase and maps each intent value to concrete behavior (overview = L0 only and sub-second; deep = relaxed thresholds). There is no explicit 'when not to use this / use X instead' for the other search siblings, but the alternative routing is clear enough to choose correctly.

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