Skip to main content
Glama
ODATANO

@odatano/nightgate-mcp

Official
by ODATANO

verify_predicate

Verify zero-knowledge predicates against live Midnight contract state to confirm a claim was recorded true on-chain, including proofs the service has not previously seen.

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.

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 (16 bits by default, 32 on attestation-vault-32)
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 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. 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"
      +]
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that verification reads live on-chain state, is free/public, is id-free, that a threshold scaling mismatch yields verified:false, and that claims are bound to a single attester's record. It does not fully describe return shape beyond the failure case or explicitly state auth requirements.

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

Conciseness5/5

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

The purpose is front-loaded, and every sentence carries operational information: predicate-specific requirements, scaling pitfalls, recomputation workflow, attester binding, and cost. Dense but not bloated.

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 complex 14-parameter tool with no annotations and no output schema, the description covers the main workflow and pitfalls. It could say more about return values and the documentIntegrity/documentDiff/cross-root predicate kinds, but the schema descriptions already document those parameters.

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

Parameters5/5

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

Schema coverage is already 100%, but the description adds important semantic constraints: threshold must be the same scaled integer the circuit hashed, setRoot must be recomputed via prepare_membership_set, fieldKey is needed for field-bound proofs, and attesterId is part of the claim coordinates. This is meaningful guidance beyond the schema text.

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?

States a specific verb and resource: verify a ZK claim against LIVE Midnight contract state. The 'Id-free: works for proofs NIGHTGATE never saw' clause gives it a distinct identity, though no sibling tool is explicitly named or contrasted.

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

Usage Guidelines3/5

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

The description implies when this is useful (id-free verification of proofs not seen by NIGHTGATE) and gives per-predicate requirements, but it never explicitly says when to choose this over verify_attestation or prepare_document_proof. Usage is implied rather than spelled out as a routing rule.

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