Skip to main content
Glama

detect_contradictions

Read-onlyIdempotent

Analyze policy documents (and optional behavioral decision logs) to detect contradictions, hidden rules, and gaps between declared policy and observed behavior. Stateless — no artifact is created and nothing is persisted. Returns contradictions of three types: rule_collision (two rules that apply to the same case with different decisions where the policy does not settle it soundly, each with that case and what the policy would do), ghost_term (an undefined standard such as "reasonable" in a rule's own text), and layer_divergence (a policy rule and a rule of practice that one case meets with different decisions); with behavioral logs, policy_gaps measured from the decisions.

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": {
      "documents": "<documents>"
    },
    "name": "detect_contradictions"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_keyNoNOMOS API key (nmk_live_...).
documentsYesPolicy documents to analyze for contradictions.
behavioral_logsNoOptional historical decision records. Enables layer_divergence detection — surfaces behavioral patterns that deviate from written policy.

Output Schema

NameRequiredDescriptionDefault
summaryNoPlain-language summary of findings
hidden_rulesNoRules inferred from behavior not in written policy
contradictionsNoList of detected contradictions
total_contradictionsNoTotal contradictions found

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint/idempotentHint, but the description adds that the tool is stateless and persists no artifact, plus a taxonomy of what it returns and how behavioral logs change the output. It stops short of noting limits on cost, document size, or failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the return-type enumeration is delivered as one long semicolon-and-parenthesis chain that is hard to parse and partly duplicates the output schema.

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?

Given an output schema exists, the definition needn't spell out return values, yet it supplies enough about document requirements, optional logs, and statelessness for an agent to call it correctly. Minor omissions on input constraints keep it below 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and each parameter is already documented, including the behavioral_logs hint. The description adds only that policy_gaps are measured from those decisions, which is marginal beyond the schema's own 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?

The description opens with a specific verb+resource ("Analyze policy documents ... to detect contradictions, hidden rules, and gaps") and scopes it precisely against observed behavior, which no sibling name (ask_authority, verify_decision, generate_governance) suggests it duplicates.

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

Usage Guidelines4/5

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

It clearly conditions the optional input: behavioral_logs enable layer_divergence and policy_gaps, while documents alone yield rule collisions and ghost terms. There is no explicit when-not or named alternative sibling, so it falls short of a 5.

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.

Resources