Skip to main content
Glama
adyoi
by adyoi

knowledge_retrieve

Retrieve relevant context chunks and format them as a ready-to-inject block for LLM prompts. Use this when the result will be used as context.

Instructions

Retrieve relevant context chunks as a ready-to-inject context block for the LLM. Prefer this over knowledge_search when the result will be used as context.

Input Schema

NameRequiredDescriptionDefault
queryYes
top_kNo
doc_idNoOnly retrieve within this document
sourceNoOnly retrieve documents with this source
min_scoreNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations the description carries the full behavioral burden, and it does disclose the output shape (a context block ready for injection). However it says nothing about read-only nature, cost, latency, or result limits/ordering, leaving meaningful behavioral gaps for a 5-parameter retrieval tool.

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?

Two tight sentences with no filler; the purpose leads and the routing guidance follows. Every sentence earns its place.

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 tool with no annotations, no output schema, and 40% schema coverage, the description conveys the core purpose and the return form but leaves behavioral and parameter details unaddressed. It is adequate to select the tool, not to invoke it confidently at the edges.

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

Parameters2/5

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

Schema description coverage is only 40%: query, top_k, and min_score are undocumented in the schema. The description adds no parameter-level meaning (no format, no default rationale, no interaction between doc_id/source and query), so it fails to compensate for the coverage gap.

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 ("Retrieve") plus resource ("relevant context chunks") and even the output form ("ready-to-inject context block"). It explicitly differentiates itself from the sibling knowledge_search, so an agent can choose between them without opening either schema.

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?

Gives an explicit selection rule: "Prefer this over knowledge_search when the result will be used as context." It names the alternative sibling and the condition that selects it. It stops short of an explicit when-not-to-use clause or any prerequisite/limit guidance.

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