Skip to main content
Glama

Check citation grounding

check_grounding
Read-only

Checks citation markers and lexical support in AI-generated text, classifying claims as grounded, placeholder, ungrounded, or invalid to flag citations that need human review.

Instructions

Checks citation markers and lexical support in AI-generated text. Splits text into checked units and classifies each one against evidence: 'grounded' (cites a marker accepted by the default lexical support matcher), 'placeholder' (an honest '[TK]'/'[citation needed]' gap), 'ungrounded' (an uncited unit without a placeholder), or 'invalid' (cites a marker id that is missing from evidence, or whose evidence is rejected by the default support matcher; this outranks every other status). 'invalid' means the unit needs human review. It does not establish that a citation was fabricated, and it covers both a missing id and a matcher rejection. Each unit carries reasons (per cited id: supported, not-supported, no-content-words, invalid-evidence or unknown-id), and nonClaims lists scaffolding lines (rules, table separators, bare fences) that were set aside. This is a mechanical check, not a truth checker. The default support matcher counts overlapping words. It rejects some faithful paraphrases (evidence '65% of the audio is English' against the claim 'about two thirds of the audio is English'), and it accepts a wrong figure or a negated claim when most other words overlap ('trained on 68,000 hours' passes against evidence of 680,000 hours; 'does not support real-time transcription' passes against evidence that it does). It cannot verify that the evidence itself is true. Use this before shipping any AI-written report, summary, or answer that cites sources, to find citations that need a person to look: send every 'invalid' unit to review, and treat 'ungrounded' units as claims that should probably cite something but currently don't. A 'grounded' unit is not confirmed true. For higher-stakes content, use grounding-kit directly with a custom supports() function (embedding-similarity or NLI-based) instead of the default matcher.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>",
      "evidence": "<evidence>"
    },
    "name": "check_grounding"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe AI-generated text to check (up to 2,000,000 characters). Citation markers use the kit's default convention `[[cite:id]]` (e.g. "The bridge opened in 1932 [[cite:source-a]]."). This tool uses the default marker/placeholder patterns; if your generator emits a different citation syntax (e.g. "[1]"), rewrite markers to `[[cite:1]]` before calling, or use grounding-kit directly with a custom markerPattern.
evidenceYesMap of citation marker id -> the evidence text/span it claims to support. This is the closed world: a marker cited in `text` whose id is NOT a key here is flagged invalid, and a marker whose evidence text doesn't plausibly support the sentence is also flagged invalid. Pass {} if there is no evidence at all (every citation will then be invalid, and uncited claims will be 'ungrounded').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.0
    • changedInput schema / properties / text / description
      Previous value: -"The AI-generated text to check. Citation markers use the kit's default convention `[[cite:id]]` (e.g. \"The bridge opened in 1932 [[cite:source-a]].\"). This tool uses the default marker/placeholder patterns; if your generator emits a different citation syntax (e.g. \"[1]\"), rewrite markers to `[[cite:1]]` before calling, or use grounding-kit directly with a custom markerPattern."New value: +"The AI-generated text to check (up to 2,000,000 characters). Citation markers use the kit's default convention `[[cite:id]]` (e.g. \"The bridge opened in 1932 [[cite:source-a]].\"). This tool uses the default marker/placeholder patterns; if your generator emits a different citation syntax (e.g. \"[1]\"), rewrite markers to `[[cite:1]]` before calling, or use grounding-kit directly with a custom markerPattern."
    • addedInput schema / properties / text / maxLength
      Added value: +2000000
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description carries most of the burden and does well: it explains precedence ('invalid... outranks every other status'), what 'invalid' does and does not mean, that nonClaims are set aside as scaffolding, and that the default matcher is lexical-only with concrete false-positive and false-negative examples. What it omits is any sense of cost/latency or size limits for large inputs, which matters given a 2M-character cap.

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?

Front-loads the verb and the classification set, then moves to limitations and usage, so an agent can stop reading early. It is long and has some retread — the 'invalid' explanation is restated ('It does not establish that a citation was fabricated, and it covers both a missing id and a matcher rejection') — but nearly every sentence carries a distinct fact.

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?

There is no output schema, yet the description fully specifies the return shape: checked units, the four statuses, per-id `reasons` values, and the `nonClaims` list. For a two-parameter read-only analyzer, an agent has everything needed to call it and interpret results correctly.

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?

Schema coverage is 100%, so the baseline is 3, but the description goes beyond it by explaining how `evidence` functions as a closed world and how ids missing from it surface as 'invalid', and by tying `text` markers to the `[[cite:id]]` convention. The per-id `reasons` vocabulary is spelled out as well, which the schema does not enumerate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and object ('Checks citation markers and lexical support in AI-generated text') and enumerates the four outcome classes, so the agent knows exactly what work happens. It also carves out its scope against truth-checking ('This is a mechanical check, not a truth checker'), but it never names a sibling tool it is distinct from, leaving the routing decision to inference.

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?

Gives explicit when-to-use ('Use this before shipping any AI-written report, summary, or answer that cites sources'), what to do with results ('send every invalid unit to review, treat ungrounded units as claims that should probably cite something'), and an explicit when-not/alternative ('For higher-stakes content, use grounding-kit directly with a custom supports() function'). It even foreshadows the schema caveat about non-default marker syntax.

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