Skip to main content
Glama

groundlens_check

Read-onlyIdempotent

Verify whether an LLM response is grounded in its provided source document. Returns a verdict (supported/partially supported/not supported) and an escalate flag when further verification is needed.

Instructions

Check whether an LLM response was drawn from its source. Grounding, not truth.

This is the main tool. It automatically selects the right method:

  • If context is provided: uses SGI (Semantic Grounding Index) to check whether the response actually engaged the source material.

  • If no context: uses DGI (Directional Grounding Index), a coarse signal with a known ceiling.

Both are deterministic — same inputs always produce the same score. No model in the scoring path. Scoring is embedding geometry.

IMPORTANT — how to report the result. A passing check means the response ENGAGED ITS SOURCE. It does NOT mean the facts are correct. A plausible wrong fact stated in the right frame (right topic, right terminology, one wrong number or date) will pass. Do not tell the user a passing check means the answer is "verified", "accurate" or "not hallucinated". Always surface the handoff field, and when escalate is true, say so: the case needs a second stage (an entailment check, a lookup against the source, or a judge).

Args: params (CheckInput): The question, response, and optional context.

Returns: str: JSON with a plain-language CHECK (Supported / Partly supported / Not supported by the document, or Looks grounded / Partly grounded / Not grounded), score, level, method, message, escalate, handoff, and the raw components.

Examples: - "Did this ChatGPT answer actually come from our policy document?" → provide question + response + the policy document as context - "Did this answer engage its source at all?" → provide question + response (no context needed)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Disclosures beyond annotations include deterministic nature, no model in scoring path, and limitation that plausible wrong facts can pass. No contradiction with annotations (readOnlyHint, idempotentHint, etc.).

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 with sections, examples, and warnings. It is slightly lengthy but every sentence adds value. Front-loaded with core purpose.

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?

Given the complexity (two methods, output with multiple fields) and available annotations/schema, the description provides complete guidance on behavior, limitations, and expected output. No output schema provided but output fields are explained.

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?

Although schema descriptions cover individual fields (question, response, context), the description adds meaning about parameter behavior (auto-mode selection based on context presence) and output interpretation. The 0% schema coverage for the top-level params property is compensated by rich tool description.

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 explicitly states the tool checks grounding against a source and distinguishes itself from siblings (groundlens_dgi, groundlens_sgi) by being the main tool that auto-selects method. It clearly identifies the verbs 'check' and 'drawn from'.

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?

Provides explicit guidance on when to use context (SGI) vs without (DGI), and warns about interpretation of results. Includes examples of appropriate use cases and alternative tools.

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/groundlens-dev/groundlens-mcp'

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