Skip to main content
Glama
chetan1521

grounded-rag-mcp

by chetan1521

answer

Retrieve cited responses from your document collection, grounding each result solely in relevant passages. Returns grounded status, with no invented content when evidence is missing.

Instructions

Answer a question grounded in a collection, with citations.

Retrieves the most relevant passages and asks the host's model (via MCP sampling) to answer using ONLY those passages, citing them. Returns {grounded, answer, citations}. If nothing relevant is found, grounded is false and no answer is invented. If the host does not support sampling, the grounded context is returned for the host to compose the answer itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
top_kNo
collectionNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so admirably. It discloses the MCP sampling mechanism, the exact return shape (`{grounded, answer, citations}`), the no-invention behavior when nothing relevant is found, and the fallback to returning grounded context when sampling is unsupported.

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 well-structured and front-loaded, stating the core purpose first, then explaining the mechanism, return format, and fallbacks. Every sentence adds meaningful information with no redundancy.

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?

The description thoroughly covers the tool's behavior, return values, and edge cases, making it largely complete for selection and invocation. It is missing parameter-level explanation for `top_k` and `collection`, but the presence of an output schema and the tool's relatively focused scope keep the gap minor.

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 0%, and the description does not explain the `top_k` or `collection` parameters at all. While `query` is self-evident from the description's reference to a question, the other two parameters are left undocumented in both the schema and the description, so the description 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?

The description opens with a specific verb and resource: 'Answer a question grounded in a collection, with citations.' It clearly differentiates itself from sibling tools like `search` by emphasizing grounded, citation-backed answers rather than raw retrieval.

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 clearly implies when to use the tool—when a grounded, cited answer is needed—and explains fallback behavior when sampling is unsupported. It does not explicitly name alternatives or exclusion criteria, but the behavioral context is strong enough for an agent to select it appropriately.

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