Skip to main content
Glama
ODATANO

@odatano/nightgate-mcp

Official
by ODATANO

prepare_document_proof

Generate canonical hash, Merkle content root, and per-field inclusion paths for a document, enabling field-level zero-knowledge proofs on the Midnight attestation layer.

Instructions

Turn a structured document into everything the proof tools need: canonical JSON and its payloadHash (what anchor_document anchors), a Merkle contentRoot over an ORDERED list of up to 16 proof fields, and per-field inclusion paths ready for prove_field_predicate. Keep the field order stable across anchor and proof: it is part of the tree identity. Compute-only and synchronous, nothing is stored server-side. The returned fields carry witness material (scaled values): treat as sensitive. Store canonicalDocument at your storageRef; re-serializing with different key order will not re-hash equal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
documentYesThe full document as a JSON object; all of it goes into payloadHash
proofFieldsYesORDERED list of fields to make provable (leaf index = position)
compiledArtifactRefNoContract artifact ref, defaults to 'attestation-vault'
Behavior5/5

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

With no annotations, the description fully discloses key behaviors: compute-only, synchronous, no server-side storage, sensitivity of witness material, and the critical non-re-hashing pitfall of re-serializing with different key order. This goes well beyond a basic read/write label.

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 description is four sentences, front-loaded with the main purpose, then adding essential behavioral notes. Every sentence contributes unique, high-value information without unnecessary fluff.

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

Completeness5/5

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

Despite lacking an output schema and annotations, the description adequately explains what the tool returns (canonical JSON, payloadHash, contentRoot, inclusion paths) and its place in the larger workflow. It covers usage caveats and output sensitivity, making it sufficiently complete for an AI agent to use correctly.

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%, with detailed descriptions for all parameters (document, proofFields, compiledArtifactRef). The description adds contextual relationships (e.g., 'what anchor_document anchors') but doesn't materially enhance parameter semantics beyond the schema's existing clarity.

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 clearly states the tool's function with a specific verb ('Turn... into'), enumerating the concrete outputs (canonical JSON, payloadHash, Merkle contentRoot, inclusion paths). It explicitly names downstream tools (anchor_document, prove_field_predicate), distinguishing it from siblings as a preparatory step.

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?

The description provides clear context that this is a prerequisite for proof/anchor tools, with usage guidance on preserving field order and storing canonicalDocument correctly. While it doesn't explicitly say when not to use it, the downstream references imply a specific place in the workflow.

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

Install Server

Other Tools

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/ODATANO/NIGHTGATE-MCP'

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