Skip to main content
Glama

kb_chunks_retrieve

Read-onlyIdempotent

Retrieves relevant passages from the connected private knowledge base. Call this whenever a question depends on the organisation's stored knowledge; the model may not otherwise have access to it. Returns a flat list of passages ordered by relevance; pass them as context when generating your answer and cite the source document for each claim. For "show me documents about X" browse-style queries, prefer kb_documents_search.

Input Schema

NameRequiredDescriptionDefault
kNoHow many chunks to return (default 8, maximum 30; larger values are clamped to 30).
modeNoRetrieval mode (default: hybrid). Use vector for semantic similarity, keyword for literal matches, hybrid (recommended) for both.
queryYesNatural-language question or search terms to ground against the corpus
group_slugsNoRestrict retrieval to docs in any of these groups
tenant_slugNoTenant slug to target. Required when your token grants several workspaces; omit when it grants one. If you omit it with several, the refusal names your default workspace; call kb_tenants_list to see every workspace the token grants.
project_slugNoRestrict retrieval to one project

Output Schema

NameRequiredDescriptionDefault
chunksYes
confidenceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds useful downstream behavior ('flat list ordered by relevance', 'cite the source document for each claim'), but says nothing about result truncation, empty-result behavior, or the tenant-disambiguation refusal path. A solid but not rich supplemental contribution given the annotation coverage.

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, then usage, then the output guidance and sibling routing. Three dense sentences with no filler; only the clause 'the model may not otherwise have access to it' is arguably padding, though it justifies the strong 'call this whenever' instruction.

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?

With a full output schema and 100% parameter coverage, the description need only supply decision context, which it does. The one gap is the multi-tenant `tenant_slug` refusal flow, which is described in the schema but not signaled in the description, so an agent could hit an avoidable error on a multi-workspace token.

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% and every parameter already carries a clear description, so the description rightly avoids duplication. It adds meaning only at the aggregate level (passages as context, relevance ordering), which is appropriate when the schema does the heavy lifting.

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 ('Retrieves relevant passages from the connected private knowledge base') and implicitly distinguishes itself from document-level siblings by emphasizing passages. An agent can immediately tell this is a retrieval/RAG grounding tool rather than a CRUD or browse tool.

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?

Gives an explicit trigger ('whenever a question depends on the organisation's stored knowledge') and names the alternative plus the condition that selects it ('For "show me documents about X" browse-style queries, prefer kb_documents_search'). Both the when and the when-not are present.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.