Skip to main content
Glama

consistency_check

Read-onlyIdempotent

Compare multiple LLM responses to the same prompt and detect inconsistencies using Jaccard word-overlap similarity and fact drift (number comparison). Fast, deterministic, no API key needed. Limitations: relies on surface-level word matching — "Paris is the capital of France" vs "Paris is the French capital" may score low despite semantic equivalence. True semantic consistency: run_semantic_tests in embedding mode. Essential for determinism testing.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "responses": [
        "The capital of France is Paris.",
        "Paris is the capital of France."
      ]
    },
    "name": "consistency_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
responsesYesArray of 2+ LLM responses to compare (same prompt, different runs)
check_factsNoCheck for contradictory numbers/facts across responses (default: true)

Output Schema

NameRequiredDescriptionDefault
verdictNo
fact_driftNo
avg_similarityNo
response_countNo
pairwise_scoresNo
fact_contradictionNo
length_variance_percentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "responses": [
      +      "The capital of France is Paris.",
      +      "Paris is the capital of France."
      +    ]
      +  }
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds value beyond that by disclosing determinism, no API key requirement, the underlying algorithm, and — unusually — a known false-negative mode, which tells the agent how much to trust low scores. It stops short of describing output shape, but an output schema exists.

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?

Purpose and method come first, then cost/auth properties, then limitations and the alternative — a sensible front-loaded order with no filler sentences. It is dense and slightly run-on in places, and the closing 'Essential for determinism testing' is a mild promotional add-on, keeping it below a 5.

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 two-parameter comparison tool with an output schema, the description covers method, cost, failure modes and the correct alternative. The remaining gap is interpretive: it never hints at what score magnitudes mean or how many responses are sensible, leaving the agent to read the output schema for that.

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 both parameters are documented and the baseline is 3. The description still adds meaning by characterizing the fact check as 'fact drift (number comparison)', clarifying that check_facts targets numeric contradictions specifically rather than general entailment.

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 names a specific verb and resource ('Compare multiple LLM responses to the same prompt and detect inconsistencies') and goes further by naming the exact mechanism (Jaccard word-overlap plus fact drift). It also distinguishes itself from the sibling run_semantic_tests, so an agent can pick between the two without opening a schema.

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?

It states the positive case ('Essential for determinism testing'), the negative case (surface-level word matching fails on paraphrases, with a concrete Paris example), and the named alternative for semantic consistency. That is explicit when/when-not/alternative guidance rather than implied usage.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.