Skip to main content
Glama

query_knowledge

Ask natural-language questions about documents in any collection. Retrieves relevant chunks via semantic search and produces an LLM-generated answer from that context.

Instructions

Ask a question about documents in a collection. Retrieves the most relevant chunks via semantic search, then uses an LLM to answer based on that context.

Works with any collection — those created by the embeddings-agent (hire_agent) or manually via vector_store_add.

Args: collection: Collection name (from embeddings-agent output or vector_store_add). question: Natural-language question about the stored data. limit: Number of context chunks to retrieve (1–20, default 5). provider: Embedding provider override for the query (openai, voyage, gemini, local). Empty = auto-detect from collection. model: Embedding model override. Empty = auto-detect from collection. dimensions: Output dimensions override (integer as string). Empty = auto-detect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
modelNo
providerNo
questionYes
collectionYes
dimensionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It explains the semantic search and LLM pipeline, and details provider/model/dimension overrides with auto-detection behavior. It doesn't explicitly state that the operation is read-only or address failure cases, but it implies no side effects and provides substantial implementation detail.

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?

The description is well-structured: a summary sentence, a compatibility note, and a parameter breakdown. It is appropriately sized given the six parameters, with no redundant text. The parameter list is necessary because the schema lacks descriptions, so it earns its place.

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?

Given the tool's moderate complexity and the presence of an output schema, the description adequately covers purpose, parameter semantics, and behavioral details. It might benefit from explicit read-only clarification or alternative tool guidance, but it is essentially complete for a QA tool.

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

Parameters5/5

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

The schema has no descriptions for any parameters, but the tool description thoroughly explains each one: collection sources, question semantics, limit range with default, and provider/model/dimension overrides with auto-detection. This fully compensates for the 0% schema coverage, adding meaning beyond the schema's bare titles.

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: ask a question, retrieve relevant chunks via semantic search, and generate an answer using an LLM. This specific verb+resource combination distinguishes it from sibling tools like vector_store_search, which likely only retrieves chunks without generating an answer.

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?

It provides context on when to use the tool by stating that it works with any collection, including those created by embeddings-agent or vector_store_add. However, it does not explicitly mention when not to use it or point to alternatives like vector_store_search, so there is clear context but no direct exclusions.

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/YokiiDesu/vending-machine-mcp'

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