Skip to main content
Glama

Detect Hallucination Risk

rai_hallucination
Read-onlyIdempotent

Analyze AI-generated text to detect hallucination risk via hedging, self-consistency, unsupported claims, and source disagreement.

Instructions

Detect hallucination risk in AI-generated text. Analyses hedging language, self-consistency across candidate responses, unsupported factual claims, and (when a source is supplied) explicit factual disagreement with that source -- e.g. the source names one day/month/number and the response names another.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesAI-generated text to analyse
sourceNoOptional ground-truth or reference text the response should be consistent with -- enables explicit factual-disagreement detection.
candidatesNoOptional additional responses for consistency scoring

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.6

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), so the bar is lower, and the description adds real behavioral detail: the four analysis dimensions and the conditional behaviour that factual-disagreement detection only activates when `source` is present. It stops short of describing output shape, confidence levels or scoring thresholds, so it is not a 5.

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?

A single front-loaded sentence leads with the core purpose before the enumeration, and the parenthetical example is the only elaboration, placed where it disambiguates `source`. Nothing is redundant with the title or annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter analysis tool with no output schema, the definition explains inputs well but says nothing about what comes back -- risk score, label, per-signal breakdown -- and gives no hint about candidate count expectations or latency/cost. Annotations cover safety, so the gap is in return-value and operational context rather than in purpose.

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; the description goes beyond it by giving a concrete semantics example for `source` ('the source names one day/month/number and the response names another') and by tying `candidates` to self-consistency scoring. That clarifies the optional parameters' purpose rather than merely restating their schema text.

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?

States a specific verb and resource ('Detect hallucination risk in AI-generated text') and then enumerates the four signals it analyses (hedging language, self-consistency across candidates, unsupported factual claims, source disagreement). That mechanism list uniquely identifies this tool against siblings like rai_scan or rai_trust_score without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the description shows the conditional value of supplying a `source` ('when a `source` is supplied ... enables explicit factual-disagreement detection'), which tells the agent when that parameter matters. There is no tool-level when-to-use guidance, no mention of when to prefer rai_scan, rai_trust_score or rai_redteam_analyze, and no stated prerequisites.

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