Skip to main content
Glama

search

Read-only

Find code and documentation using hybrid keyword and embedding retrieval, with filters by folder or chunk kind. Returns ranked snippets with path:line citations and symbols for targeted lookups.

Instructions

Hybrid search over code and docs (BM25 keywords plus local embeddings, fused by rank). Use this for a targeted lookup, or when you need filters by folder or chunk kind; for a question you'll answer in prose, use ask_codebase instead. Returns ranked chunks, each with a path:start-end citation, its symbol and a snippet.

Input Schema

NameRequiredDescriptionDefault
kNoHow many results to return, 1 to 25.
repoNoName of an indexed repo, as list_repos shows it. Leave out when only one repo is indexed.
kindsNoOnly these chunk kinds: function, class, method, interface, type, enum, module, section (docs) or code (other files).
queryYesAn identifier (normalizeRetryOptions) or plain words.
path_prefixNoOnly consider files under this path, e.g. "src/auth/" or "docs/".

Output Schema

NameRequiredDescriptionDefault
repoYes
queryYes
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.2.1
    • addedInput schema / properties / k / description
      Added value: +"How many results to return, 1 to 25."
    • addedInput schema / properties / kinds / description
      Added value: +"Only these chunk kinds: function, class, method, interface, type, enum, module, section (docs) or code (other files)."
    • addedInput schema / properties / path_prefix / description
      Added value: +"Only consider files under this path, e.g. \"src/auth/\" or \"docs/\"."
    • addedInput schema / properties / query / description
      Added value: +"An identifier (normalizeRetryOptions) or plain words."
    • addedInput schema / properties / repo / description
      Added value: +"Name of an indexed repo, as list_repos shows it. Leave out when only one repo is indexed."
  2. First observedv0.2.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuine behavioral context beyond that: the two retrieval strategies and how they are fused, plus the shape of each returned chunk (path:start-end citation, symbol, snippet). It stops short of covering result-quality caveats or how ranking ties break, but that is a minor omission given the annotations and output schema.

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?

Three tight sentences: mechanism first, selection guidance second, return shape last. No filler and no restatement of the tool name or schema.

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?

With five fully documented parameters, a present output schema and read-only annotations, the remaining burden on the description is mechanism, alternatives and result shape — all three are covered. Nothing an agent needs in order to call this correctly is missing.

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 description coverage is 100%, and the schema already documents k, repo, kinds, query and path_prefix in detail. The description only gestures at filter usage ("filters by folder or chunk kind") without adding syntax or semantics beyond the schema, so the baseline 3 applies.

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?

"Hybrid search over code and docs (BM25 keywords plus local embeddings, fused by rank)" names a specific verb and resource and explains the retrieval mechanism in the same breath. It also implicitly separates itself from prose-answering siblings like ask_codebase, so an agent can pick it without opening the schema.

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?

Explicit positive cases ("targeted lookup", "when you need filters by folder or chunk kind") and an explicit negative with the named alternative ("for a question you'll answer in prose, use ask_codebase instead"). Both branches of the decision are stated.

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