Skip to main content
Glama

TruthGate for Agents

TruthGate is a fail-closed preflight, approval, evidence, and verification runtime for Hermes, OpenClaw, n8n agents, and custom LLM systems.

It does not promise zero hallucinations. It prevents unsupported output from being treated as verified completion.

v0.2 security model

  • Server-owned policy cannot be weakened by request payloads.

  • API routes require a bearer key.

  • High-risk approvals are HMAC-signed, task-bound, expiring, and single-use.

  • External tool traces can require HMAC signatures.

  • Evidence IDs, citations, trust, claim coverage, tool success, output text, and artifact hashes receive deterministic checks.

  • Evidence is scanned for common prompt-injection patterns before generation.

  • A genuinely different verifier model is required by default.

  • Audit events avoid raw prompts, tokens, and secrets.

  • Verified memory is deduplicated and retains task provenance.

  • Provider requests use bounded retries and sanitized errors.

Related MCP server: ATLAS MCP

Install

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .env
truthgate-api

Open http://127.0.0.1:8787/docs. All /v1/* routes require:

Authorization: Bearer <TRUTHGATE_API_KEY>

Production startup rejects the included development secrets.

Hermes MCP integration

TruthGate exposes three narrow MCP tools:

  • truthgate_preflight

  • truthgate_verify

  • truthgate_authorize

Use integrations/hermes/config.example.yaml to configure the stdio server in ~/.hermes/config.yaml, then run /reload-mcp in Hermes. Copy the companion integrations/hermes/SKILL.md into your Hermes skills directory if you want Hermes to follow the gate workflow consistently.

Human approval

Preflight returns task_id and task_digest. A human can issue a short-lived approval:

truthgate approve \
  --task-id TASK_ID \
  --task-digest TASK_DIGEST \
  --risk-level high

The token does not authorize a different task contract and cannot be consumed twice.

Deterministic rules

Requests can attach server-validated rules:

  • evidence_exists

  • tool_succeeded

  • output_contains

  • artifact_sha256

Model verification is never enough by itself. A final result is verified only when the independent verifier and all deterministic gates pass.

API

  • GET /health

  • POST /v1/preflight

  • POST /v1/verify

  • POST /v1/run

  • POST /v1/authorize

  • GET /v1/memory

  • GET /v1/audit/{task_id}

Hard limitation

MCP cannot intercept every Hermes built-in tool result. Signed traces require a trusted host wrapper or a native Hermes tool-result hook. Without that hook, TruthGate should verify knowledge work and explicit evidence, but must not claim cryptographic proof of every action Hermes performs.

Available Tools

3 tools
truthgate_authorizeC

Consume a human-issued approval immediately before a risky action.

ParametersJSON Schema
NameRequiredDescriptionDefault
task_idYes
task_digestYes
approval_tokenYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations, the description must fully disclose behavior. It states the tool consumes an approval, implying a state change, but does not detail side effects, required permissions, error conditions, or whether the action is irreversible. The output schema exists but is not referenced.

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 description is a single sentence, which is concise, but it lacks critical details about parameters and behavior. It is not too wordy, but the brevity sacrifices completeness.

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

Completeness2/5

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

Given the absence of annotations, an output schema exists to define the response, but the description does not mention the output format or any preconditions. For a tool with three required parameters and no sibling usage guidance, the description is insufficiently complete.

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

Parameters1/5

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

The input schema has three required parameters with 0% description coverage, and the tool description provides no explanation of what task_id, task_digest, or approval_token mean. The description adds zero value beyond the schema titles.

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?

The description clearly states the tool consumes a human-issued approval before a risky action, indicating its role in the authorization flow. It distinguishes from siblings (preflight, verify) by focusing on the final approval step, though it could be more explicit about the exact resource being consumed.

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

Usage Guidelines2/5

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

The description only implies usage 'immediately before a risky action' but gives no explicit guidance on when to use this versus the siblings truthgate_preflight or truthgate_verify. No exclusions or alternative scenarios are mentioned, leaving the agent to infer proper context.

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

truthgate_preflightC

Compile and gate a task before Hermes uses external tools.

ParametersJSON Schema
NameRequiredDescriptionDefault
taskYes
contextNo
task_idNo
evidence_jsonNo[]
approval_tokenNo
success_criteria_jsonNo[]

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.4/5.0
Behavior2/5

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

No annotations provided, and description does not disclose behavioral traits such as side effects, authentication needs, or rate limits. 'Compile and gate' is vague without further context on what happens to the task.

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?

Description is a single sentence, which is concise, but it is under-specified and does not earn its place by providing sufficient detail.

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

Completeness2/5

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

With 6 parameters, no schema descriptions, no annotations, and an output schema present but unmentioned, the description fails to cover essential context for correct usage.

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

Parameters1/5

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

Schema description coverage is 0%, yet the description adds no information about any of the 6 parameters (task, context, task_id, etc.). This is a critical gap for a tool with multiple parameters.

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?

Description clearly specifies the action ('compile and gate') and resource ('a task') with context ('before Hermes uses external tools'). It distinguishes from sibling tools by implying it's a preparatory step, but could be more explicit about what 'compile and gate' entails.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus siblings 'truthgate_verify' or 'truthgate_authorize'. The description does not provide exclusions or alternative conditions.

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

truthgate_verifyC

Verify Hermes' final candidate against evidence and tool traces.

ParametersJSON Schema
NameRequiredDescriptionDefault
payload_jsonYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2/5.0
Behavior1/5

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

No annotations provided. The description does not disclose side effects, permissions, or behavior (e.g., read-only, destructive). For a verification tool, it should indicate if it modifies state or requires specific access.

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 description is a single sentence with minimal noise, but it is too brief and lacks structure. Some detail could be added without sacrificing conciseness.

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

Completeness2/5

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

Given a single parameter, no output schema details provided, and no annotations, the description fails to explain what the output represents or error handling. The tool's completeness is insufficient for a verification task.

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

Parameters1/5

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

The sole parameter 'payload_json' has no description in the schema (0% coverage). The tool description does not explain what the payload should contain or its role in verification.

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

Purpose3/5

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

The description states the tool verifies 'Hermes' final candidate' against evidence and tool traces, indicating a specific verb and resource. However, 'Hermes' and 'candidate' are domain-specific terms not explained, reducing clarity. It distinguishes from siblings by implying a final verification step, but not explicitly.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus siblings (truthgate_preflight, truthgate_authorize). The description does not provide context for appropriate usage or alternatives.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.2.0
    • First observedtruthgate_authorize
    • First observedtruthgate_preflight
    • First observedtruthgate_verify

TDQS

C2.9/5.0
Disambiguation5/5

Each tool has a distinct role: preflight prepares tasks before tool use, verify checks final outputs, and authorize handles human approval. No overlap in purpose.

Naming Consistency5/5

All tools follow the 'truthgate_verb' pattern with clear action verbs (preflight, verify, authorize), providing a predictable naming scheme.

Tool Count4/5

Three tools is on the smaller side but suitable for a specialized gatekeeping server that handles pre-use, post-use, and approval steps.

Completeness4/5

The set covers the key stages of the gating workflow: pre-check, verification, and authorization. Minor gaps like handling verification failures are not critical.

Maintenance

ActivitySlowing
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Safe, reliable, and verifiable execution for the Model Context Protocol, enabling governed tasks with planning, capability approval, side-effect verification, and evidence receipts.
    15
    8
    Apache 2.0
  • F
    license
    Not graded
    quality
    B
    maintenance
    Provides a secure MCP boundary for AI agents, intercepting and validating tool calls, redacting secrets, and requiring human approval for sensitive actions with a tamper-evident audit trail.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables controlled AI-agent access to enterprise-shaped tools with a deny-by-default gated write path, human approval, dry-run execution, and append-only audit logging.
    1
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ay7627514-dotcom/truthgate'

If you have feedback or need assistance with the MCP directory API, please join our Discord server