Skip to main content
Glama
@odatano/nightgate-mcp

@odatano/nightgate-mcp

Official
by ODATANO

verify_predicate

Verifies zero-knowledge attestation claims against live Midnight contract state, even for proofs NIGHTGATE never saw, by checking attester, payload hash, and predicate coordinates.

Instructions

Verify against LIVE Midnight contract state that a ZK claim was recorded true on-chain. Id-free: works for proofs NIGHTGATE never saw. Numeric predicates (lessOrEqual / greaterOrEqual) need threshold (the SAME scaled integer the circuit hashed; a scaling mismatch yields verified:false) and optionally fieldKey for field-bound proofs. bytesEquality needs fieldKey + expectedDigest; setMembership needs fieldKey + setRoot (recompute it from the published list via prepare_membership_set). Every claim is bound to ONE attester's record of the document, so attesterId is part of the coordinates. Free: it reads the public verify service.

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": {
      "attesterId": "<attesterId>",
      "payloadHash": "<payloadHash>",
      "predicate": "<predicate>"
    },
    "name": "verify_predicate"
  }
}

Input Schema

NameRequiredDescriptionDefault
kNodocumentDiff only: the k that was proven
networkNoRead from another network public indexer instead of the configured one
setRootNosetMembership only: the canonical allow-list set root
fieldKeyNoField key (64 hex); required for the numeric and bytes kinds, unused for the cross-root kinds
predicateYesClaim kind
thresholdNoNumeric predicates only: scaled circuit integer threshold
attesterIdYesThe attester whose record of payloadHash carries the claim (64 hex)
allowedMaskNodocumentIntegrity only: the packed slot mask that was proven (32 bits; 16 on a 16-slot attestation-vault)
attesterIdBNoCross-root kinds: document B's attester; defaults to attesterId
payloadHashYesThe attestation payload hash (64 hex)
payloadHashBNoCross-root kinds: the second document. (A, B) order is part of the claim, query it as proven
expectedDigestNobytesEquality only: the public expected value digest
contractAddressNoAttestationVault address (64 hex); default NIGHTGATE_SANDBOX_VAULT, else the shared sandbox vault of the network (preprod, preview)
compiledArtifactRefNoContract artifact ref, defaults to 'attestation-vault-32'; 'attestation-vault' for a 16-slot vault

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.23.0
    • changedInput schema / properties / allowedMask / description
      Previous value: -"documentIntegrity only: the packed slot mask that was proven (16 bits by default, 32 on attestation-vault-32)"New value: +"documentIntegrity only: the packed slot mask that was proven (32 bits; 16 on a 16-slot attestation-vault)"
  2. Changed1 schema field changedv0.22.0
    • changedInput schema / properties / contractAddress / description
      Previous value: -"AttestationVault address (64 hex); default the shared sandbox vault of the network (preprod, preview)"New value: +"AttestationVault address (64 hex); default NIGHTGATE_SANDBOX_VAULT, else the shared sandbox vault of the network (preprod, preview)"
  3. Changed18 schema fields changedv0.18.3
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / allowedMask
      Added value: +{
      +  "description": "documentIntegrity only: the packed slot mask that was proven (16 bits by default, 32 on attestation-vault-32)",
      +  "maximum": 4294967295,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / attesterId
      Added value: +{
      +  "description": "The attester whose record of payloadHash carries the claim (64 hex)",
      +  "pattern": "^[0-9a-fA-F]{64}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / attesterIdB
      Added value: +{
      +  "description": "Cross-root kinds: document B's attester; defaults to attesterId",
      +  "pattern": "^[0-9a-fA-F]{64}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / compiledArtifactRef / description
      Previous value: -"Contract artifact ref, defaults to 'attestation-vault'"New value: +"Contract artifact ref, defaults to 'attestation-vault-32'; 'attestation-vault' for a 16-slot vault"
    • changedInput schema / properties / contractAddress / description
      Previous value: -"AttestationVault contract address"New value: +"AttestationVault address (64 hex); default the shared sandbox vault of the network (preprod, preview)"
    • removedInput schema / properties / contractAddress / minLength
      Removed value: -1
    • addedInput schema / properties / contractAddress / pattern
      Added value: +"^[0-9a-fA-F]{64}$"
    • addedInput schema / properties / expectedDigest
      Added value: +{
      +  "description": "bytesEquality only: the public expected value digest",
      +  "pattern": "^[0-9a-fA-F]{64}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / fieldKey / description
      Previous value: -"Optional field key (64 hex) for field-bound proofs"New value: +"Field key (64 hex); required for the numeric and bytes kinds, unused for the cross-root kinds"
    • addedInput schema / properties / k
      Added value: +{
      +  "description": "documentDiff only: the k that was proven",
      +  "maximum": 32,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / payloadHashB
      Added value: +{
      +  "description": "Cross-root kinds: the second document. (A, B) order is part of the claim, query it as proven",
      +  "pattern": "^[0-9a-fA-F]{64}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / predicate / description
      Previous value: -"Predicate operator"New value: +"Claim kind"
    • changedInput schema / properties / predicate / enum
      Previous value: -[
      -  "lessOrEqual",
      -  "greaterOrEqual"
      -]New value: +[
      +  "lessOrEqual",
      +  "greaterOrEqual",
      +  "bytesEquality",
      +  "setMembership",
      +  "documentIntegrity",
      +  "documentDiff"
      +]
    • addedInput schema / properties / setRoot
      Added value: +{
      +  "description": "setMembership only: the canonical allow-list set root",
      +  "pattern": "^[0-9a-fA-F]{64}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / threshold / anyOf
      Previous value: -[
      -  {
      -    "pattern": "^\\d+$",
      -    "type": "string"
      -  },
      -  {
      -    "minimum": 0,
      -    "type": "integer"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^\\d+$",
      +    "type": "string"
      +  },
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 0,
      +    "type": "integer"
      +  }
      +]
    • changedInput schema / properties / threshold / description
      Previous value: -"Scaled circuit integer threshold (same scaling the circuit hashed)"New value: +"Numeric predicates only: scaled circuit integer threshold"
    • changedInput schema / required
      Previous value: -[
      -  "contractAddress",
      -  "payloadHash",
      -  "predicate",
      -  "threshold"
      -]New value: +[
      +  "attesterId",
      +  "payloadHash",
      +  "predicate"
      +]
  4. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the whole burden and does disclose key traits: it reads live on-chain state, is id-free, is free (public verify service), claims are bound to one attester's record, and a scaling mismatch silently yields verified:false. It still never states return shape beyond that single field, nor failure modes for missing/invalid contract state.

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?

The core purpose and the id-free differentiator are front-loaded, and the predicate-specific requirements are packed into single clauses. The telegraphic, run-on phrasing ("Id-free:", "Free:") trades a little readability for density, but nearly every sentence carries operational information.

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 14-parameter, no-annotation, no-output-schema tool this covers the essentials: what state is read, per-kind parameter requirements, the attester binding, and the scaling pitfall. It cannot be fully complete without at least hinting at the response body (only verified:false is implied) and defaults resolution beyond what the schema states.

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 earns above that by adding semantics the schema lacks — threshold must be the exact scaled integer the circuit hashed (mismatch ⇒ verified:false), attesterId is part of the claim coordinates, and setRoot must be recomputed via prepare_membership_set. Unmentioned extras (k, allowedMask, network, compiledArtifactRef) are harmless because the schema documents them fully.

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?

"Verify against LIVE Midnight contract state that a ZK claim was recorded true on-chain" gives a specific verb, resource and trust source, and the follow-up "Id-free: works for proofs NIGHTGATE never saw" carves out a capability boundary against the attestation-oriented siblings without needing the schema.

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 routes clearly per claim kind: numeric predicates need threshold, bytesEquality needs fieldKey + expectedDigest, setMembership needs fieldKey + setRoot, and it points at prepare_membership_set to recompute that root. What's missing is explicit exclusion guidance versus verify_attestation (when a known-proof path is preferable), so it stops short of a full when/when-not statement.

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