Skip to main content
Glama
groundlens-deprecated

groundlens-deprecated

Official

groundlens-mcp

Moved. The GroundLens MCP server ships inside the groundlens package. This repository is archived, and the groundlens-mcp package on PyPI installs nothing but a message that says so.

pip install "groundlens[mcp]"
groundlens-mcp
{ "mcpServers": { "groundlens": { "command": "groundlens-mcp" } } }

With nothing installed, through uv:

{
  "mcpServers": {
    "groundlens": {
      "command": "uvx",
      "args": ["--from", "groundlens[mcp]", "groundlens-mcp"]
    }
  }
}

Keep --from "groundlens[mcp]": a bare uvx groundlens-mcp installs this old package instead of the server.

The server has three tools: verify_answer, verify_run and verify_records. GroundLens is guardrails for LLM answers: it checks an LLM answer against its sources without a model, decides PASS, REVIEW or FAIL under your policy, and keeps a signed record.

Apache-2.0.

Available Tools

3 tools
groundlens_checkA
Read-onlyIdempotent

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)

Inputs: params (required). Returns: result

groundlens_dgiA
Read-onlyIdempotent

Coarse context-free grounding signal, for when no source is available (DGI).

DGI (Directional Grounding Index) compares the question-to-response displacement against the direction typical of answers written from a source. No context is needed, so it works for open-ended chat and general Q&A.

IMPORTANT: this is the weakest signal here and it has a measured ceiling. With authorship held constant it reaches AUROC 0.606, and the ceiling of the entire embedding-similarity class is about 0.68. It is a ranking signal for triage, not a detector, and it is not a risk verdict. Prefer groundlens_sgi whenever a source is available. Never report a DGI score as evidence that an answer is true or false.

Args: params (DGIInput): The question and LLM response.

Returns: str: JSON with a plain-language CHECK, the DGI score, the magnitude, escalate and handoff.

Examples: - Ranking a batch of chat answers so a reviewer starts with the worst - Screening outputs when no source document exists

Inputs: params (required). Returns: result

groundlens_sgiA
Read-onlyIdempotent

Check whether an LLM response engaged a source document (SGI). Provenance, not truth.

SGI (Semantic Grounding Index) measures whether the response engaged with the provided context or stayed anchored to the question. This is the method to use for RAG pipeline verification — did the model actually use the retrieved documents?

The score is a ratio: dist(response, question) / dist(response, context). A high ratio means the response moved toward the context. A low ratio means it stayed near the question (possibly ignored the context).

IMPORTANT: this measures PROVENANCE. An answer that borrows the source's vocabulary and structure but changes one figure will pass. Surface the handoff field and escalate fact-level verification to a second stage.

Args: params (SGIInput): The question, source context, and LLM response.

Returns: str: JSON with a plain-language CHECK, the SGI score, and the two distances.

Examples: - Verifying a RAG chatbot used the retrieved documents - Checking if a summary is faithful to the source text - Auditing whether context was ignored in a customer support bot

Inputs: params (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 3 tools

    Disambiguation3/5

    groundlens_check is a wrapper that automatically dispatches to the same SGI and DGI methods exposed as separate tools, so the purposes overlap by design. The descriptions help clarify context vs. no-context usage, but an agent could still be unsure whether to call the main check tool or the method-specific one.

    Naming Consistency4/5

    All tools share the groundlens_ prefix and use lowercase snake_case, which is readable and predictable. The pattern is slightly inconsistent because check is a verb while sgi and dgi are method acronyms, but this is a minor deviation rather than chaotic naming.

    Tool Count5/5

    Three tools is a well-scoped count for a focused grounding-check server. The auto-selecting dispatcher plus the two explicit methods is compact and each tool has a documented role.

    Completeness5/5

    The set covers the full grounding-check lifecycle: automatic selection, context-based SGI, and context-free DGI. Fact-level verification is explicitly out of scope and delegated via handoff, so there is no obvious missing tool for the server's stated purpose.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers