Skip to main content
Glama

retrieve

Unifies retrieval across KG, memory, and docs by expanding queries with domain knowledge to surface conceptual matches that keyword search misses.

Instructions

Unified retrieval across KG, Memory, and Docs with KG-powered query expansion. Use for conceptual queries where keyword search fails. Automatically expands query using KG domain knowledge (e.g., 'transformer optimization' -> includes KV cache, Flash Attention). Fuses results via reciprocal rank fusion. Returns results with source attribution. Default: compact=true (shorter snippets, ~500-800 tokens). Use compact=false for full content (~2000 tokens).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default: 10)
queryYesSearch query
rerankNoUse cross-encoder reranking for better relevance (default: false). Requires a running reranker.
compactNoLow token mode: shorter snippets (200 chars). Default: true. Set false for full content (500 chars).
sourcesNoSources to search (default: ['kg', 'docs', 'memory'])
doc_typeNoFilter docs by type (markdown, json, code, etc.)
doc_sourceNoFilter docs by source (github, arxiv, devdocs, etc.)
expand_queryNoUse KG for query expansion (default: true)
rerank_top_nNoCandidates to fetch before reranking (default: 20). Only used if rerank=true.
semantic_thresholdNoMin similarity for semantic search (default: 0.5)
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 burden of behavioral disclosure. It explains key internal behaviors: KG-powered query expansion with an example, reciprocal rank fusion, source attribution, and compact mode token estimates. However, it does not explicitly state whether the operation is read-only or side-effect-free, though the nature of retrieval implies it.

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 about 80 words and front-loads the core purpose in the first sentence. Every sentence adds value: purpose, usage scenario, expansion behavior, fusion method, output attribution, and compact defaults. It is dense but not verbose.

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?

For a complex tool with 10 parameters and no output schema, the description provides a strong high-level overview, including expansion, fusion, and sourcing. However, it does not describe the return result structure beyond 'source attribution,' nor does it explain how parameters interact (e.g., rerank requiring rerank_top_n). This is adequate but not fully complete.

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 coverage is 100%, so the baseline is 3. The description adds some extra context for specific parameters: compact mode token counts (~500-800 vs ~2000) and expand_query behavior, but these details are also partially in the schema. The description does not meaningfully improve understanding of the more complex parameters like rerank or semantic_threshold.

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 states the tool's function: 'Unified retrieval across KG, Memory, and Docs' with a specific verb ('retrieve') and resource scope. It also distinguishes itself from sibling tools by focusing on conceptual queries and knowledge-graph expansion, making its role unique.

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?

The description tells the agent when to use the tool: 'Use for conceptual queries where keyword search fails.' It provides a clear context but does not explicitly mention when to avoid it or direct users to alternatives like the sibling tools (sqlite, memory, kg), so it misses an explicit exclusion list.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cutlerbenjamin1-cmd/hybrid-recall'

If you have feedback or need assistance with the MCP directory API, please join our Discord server