Skip to main content
Glama

check_grounding

Read-only

Verify an answer against source context before returning it: confirm required facts appear, trace every number to evidence, and require abstention when context lacks the answer.

Instructions

Check whether an answer is grounded in the provided context. Deterministic (no LLM judge): verifies that required facts appear in the answer, that every number in the answer traces to the context, and — for questions the context cannot answer — that the answer abstains instead of fabricating. Use this to self-check RAG / document-QA / retrieval answers before returning them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
answerYesThe answer to check.
contextYesThe retrieved context the answer must be grounded in (a string, or an array of passages).
questionNoThe original question (optional; lets numbers from the question count as grounded).
must_abstainNoSet true when the context does NOT contain the answer: the answer must then decline rather than fabricate.
expected_factsNoFacts a correct answer must contain (e.g. "30 days", "no restocking fee"). Each must appear in the answer.
allowed_new_numbersNoNumbers the answer may introduce that are not in the context (e.g. from the question).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description adds substantial behavioral detail: the tool is deterministic rather than LLM-based, verifies required facts, requires every number to trace to the context, and abstains on unanswerable questions. This gives the agent a precise model of the tool's internal behavior without contradicting the annotation.

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 entire description is two sentences with no filler. The core purpose is front-loaded in the first clause, the key differentiator ('Deterministic (no LLM judge)') appears early, and the use-case directive closes the description. Every sentence 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?

For a 6-parameter verification tool with no output schema, the description covers the core decision logic and the intended invocation context. The only notable gap is that it doesn't describe the return value or result shape, but the tool name and 'check whether' phrasing make the boolean verdict reasonably inferable. Overall, the agent has enough to invoke and interpret behavior correctly.

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

Parameters3/5

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

Schema description coverage is 100%, with each parameter already documented (answer, context, question, must_abstain, expected_facts, allowed_new_numbers). The description adds general grounding semantics, such as 'required facts appear in the answer' and 'every number in the answer traces to the context,' but it does not add per-parameter meaning beyond the schema. This meets the baseline for high schema coverage.

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: 'Check whether an answer is grounded in the provided context.' It goes further to distinguish the tool from a generic judge by explicitly saying 'Deterministic (no LLM judge)' and enumerating the exact checks performed (required facts, numeric traceability, abstention). Even with no sibling tools, an agent knows exactly what this tool does.

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 gives a clear usage directive: 'Use this to self-check RAG / document-QA / retrieval answers before returning them.' This states when to use the tool explicitly. There are no excluding conditions or alternatives to compare against, but the deterministic note and concrete use cases provide clear context for selection.

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

Deploy Server

Other Tools