Skip to main content
Glama
samishekhalard

rag-mcp

rag_answer

Generates a sourced answer to a question by querying the RAG service, returning supporting documents, latency breakdown, and query cost for when you need a written response rather than raw passages.

Instructions

Ask the RAG service to generate an answer, with its sources and trace.

This calls a language model, so it is slower and costs money; prefer rag_search when you intend to read the passages and answer yourself. Returns the answer, the documents it drew on, the per-stage latency breakdown and the cost of the query in USD.

Input Schema

NameRequiredDescriptionDefault
questionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries strong disclosure: it warns that an LLM call makes this slower and cost-bearing, and it enumerates the response payload (answer, source documents, per-stage latency, USD cost). What's missing is any statement of failure modes, timeouts, or idempotency, but the cost/latency warning is exactly the context an agent needs.

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?

Four short sentences; the purpose leads, the cost/latency caveat and the alternative follow, and the return shape closes. No filler or repetition of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, yet the description still summarizes the return shape usefully, and the single-parameter surface is fully covered by the purpose statement plus the timing/cost caveat.

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?

Only one parameter exists and schema description coverage is 0%, but 'question' is self-evident from the name and the description's framing of generating an answer from sources. No real ambiguity remains to document.

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 — 'Ask the RAG service to generate an answer' — and immediately scopes it as answer-plus-sources-plus-trace, which distinguishes it from the sibling rag_search that returns passages only.

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?

Explicitly routes the agent: 'prefer rag_search when you intend to read the passages and answer yourself.' That names the alternative and the condition that selects it, leaving little to inference.

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