Skip to main content
Glama

hybrid_retrieve

Ranks repository symbols, documentation, package scripts, and Git history to return source-backed context for a query; defaults to deterministic fusion and can add embeddings when enabled.

Instructions

Ranks source symbols plus structural, documentation, package-script, and Git-commit evidence without embeddings by default. Returned evidence is source-backed context, not a verified answer.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "repository_root": "<repository_root>",
      "query": "<query>"
    },
    "name": "hybrid_retrieve"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNobasic (default) fuses deterministic rankings; lexical is symbol-only; hybrid also uses embeddings when enabled.
limitNoMaximum candidates; defaults to 10.
modelNoLocal Ollama embedding model for enabled hybrid mode.
queryYesQuestion, identifier, path, or behavior to retrieve.
repository_rootYesAbsolute path to the Git repository root to explore.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does disclose two useful traits beyond the name: embeddings are off by default (implying deterministic, no-model-dependency behavior) and the output is source-backed evidence rather than a verified answer, which calibrates trust appropriately. It does not describe result ordering, how evidence is aggregated, or behavior on an empty/unindexed repository.

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?

Two sentences, front-loaded with the core ranking behavior and followed by a short caveat. Every clause carries information, though the first sentence is dense with enumerated evidence sources that could be easier to scan as a list.

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?

For a five-parameter tool with no output schema, the description explains what is ranked and that results are unverified context, but says nothing about the shape of the returned evidence or its ordering. Combined with no sibling routing guidance, an agent has enough to call it but not enough to prefer it confidently over alternatives.

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%, so all five parameters are already documented in the schema, establishing the baseline of 3. The description adds only an indirect hint that embeddings are absent by default, which loosely corroborates the 'basic' default mode described in the schema. No syntax, path-format, or model-selection detail is added.

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?

States a specific verb and scope: it ranks source symbols plus structural, documentation, package-script, and Git-commit evidence in response to a query. That is clearly a retrieval/ranking operation, and the 'without embeddings by default' clause signals its place among search mechanisms. It stops short of naming a sibling or explicitly saying how it differs from find_symbol or find_references.

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 when-to-use or when-not-to-use guidance, and no alternative tool is named. The phrase 'without embeddings by default' implies a tradeoff with embedding-based search, but the agent is left to infer the selection criteria. With six sibling retrieval/lookup tools available, this is a real gap.

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