Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HFW_DOTENVNoExtra .env file to load.
HFW_LEDGERNoEvidence ledger path shared by the server and the Claude Code hook..hfw/ledger.jsonl
HFW_LLM_MODELNoModel for claim extraction and the tier-2 judge. Defaults to claude-haiku-4-5 or openai/gpt-oss-20b depending on provider.
HFW_NLI_MODELNoAny Hugging Face NLI classifier; cross-encoder/nli-deberta-v3-xsmall is about 3x faster.MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli
HFW_EMBED_MODELNoEmbedding model. Empty string means BM25 only.BAAI/bge-small-en-v1.5
HFW_LLM_BASE_URLNoLLM base URL, e.g. http://localhost:11434/v1 for Ollama. Defaults to the provider default.
HFW_LLM_PROVIDERNoLLM provider: anthropic, groq, openai (any OpenAI-compatible endpoint), or none. auto picks Anthropic if ANTHROPIC_API_KEY is set, then Groq.auto
HFW_PROXY_CONFIGNoDownstream servers JSON config (same as --proxy).

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Hallucination Firewall checks your final answer against the tool outputs you actually received in this session.

REQUIRED WORKFLOW for any answer that states facts taken from tool results:

  1. Gather evidence with your tools as usual. Tool outputs are recorded automatically (proxied tools, or the Claude Code hook). If a fact came from somewhere that was not recorded, call record_evidence with the source text first.

  2. Write your draft answer, then call verify_answer(draft) BEFORE replying to the user.

  3. If the result says blocked, do not send the draft. Fix every claim marked contradicted (use the correction / evidence given) and remove or hedge unsupported ones, or call rewrite_grounded(draft). Then verify again.

  4. In your reply, mention when the firewall corrected something. The firewall only checks claims against tool evidence, not against world knowledge.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
verify_answerA

Check every factual claim in a draft answer against recorded tool outputs.

Call this before giving the user any answer based on tool results. Returns a verdict per claim (supported / contradicted / unsupported / not_checkable), the evidence behind it, a correction for wrong figures, and whether the draft is blocked.

Args: draft: the full answer you intend to send. strictness: optional one-off override: lenient | balanced | strict. action: optional one-off override: annotate | block | rewrite.

verify_claimB

Check one standalone factual claim against recorded tool outputs.

explain_verdictA

Show the full evidence passages and what each tier decided for a claim id (e.g. "r1.c2").

rewrite_groundedA

Return a corrected version of the draft: wrong figures replaced with the evidence values, unsupported claims hedged (or removed with unsupported="remove"), and citations to the tool outputs added.

set_policyB

Configure the firewall.

Args: strictness: lenient | balanced | strict (presets for block_on and thresholds). tiers: which verifier tiers may run: 0 exact, 1 NLI model, 2 LLM judge. block_on: verdicts that block the answer, e.g. ["contradicted", "unsupported"]. action: what to do with a flagged answer: annotate | block | rewrite. threshold: tier-1 confidence (0.5-1.0) needed to decide without the LLM judge.

record_evidenceA

Add evidence by hand (e.g. text from a tool that is not proxied or hooked). Use the exact text the source returned, never your own summary.

reset_sessionA

Clear the evidence ledger and verdict history (start of a new task).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
ledger_resourceEverything the tools returned this session.
report_resourceHallucination report for this session.

TDQS

A3.8/5.0

Scored across 7 tools

Disambiguation4/5

Each tool targets a distinct step in the verify workflow: policy setup, evidence capture, single-claim check, whole-answer check, verdict inspection, and rewriting. The only mild overlap is verify_claim vs verify_answer, though the descriptions clearly distinguish one claim from every claim in a draft.

Naming Consistency5/5

All seven tools follow a clean snake_case verb_noun pattern (verify_claim, set_policy, record_evidence, reset_session, verify_answer, explain_verdict, rewrite_grounded). No mixing of conventions.

Tool Count5/5

Seven tools is well-scoped for a claim-verification firewall, with each tool covering a necessary stage of the workflow. Nothing feels padded or redundant.

Completeness4/5

The surface covers the full lifecycle: configure policy, record evidence, verify (single and bulk), explain verdicts, rewrite, and reset. Minor gaps exist in that there is no read-back of the current policy or a way to list/inspect recorded evidence, but core workflows are fully served.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues