Skip to main content
Glama
ODATANO

@odatano/nightgate-mcp

Official
by ODATANO

anchor_document

Anchor a document's content hash to the Midnight blockchain, committing only sha256 and public metadata. Returns a job ID for async tracking and a document ID for later verification.

Instructions

Anchor a document content hash on the Midnight chain via the AttestationVault attest circuit. Commits only the sha256 + public metadata; you are responsible for storing the actual bytes at storageRef. Attestation is first-come-first-served per hash. Async: returns { jobId, status } immediately; poll get_job_status until succeeded or failed. Also returns documentId for verify_document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoContent size in bytes, informational
sha256Yessha256 of the document content (64 hex), becomes the on-chain payload hash
metadataNoPublic metadata object; its hash is anchored alongside
sessionIdYesWallet session id that signs and submits
storageRefYesWhere the bytes live, e.g. file://, s3://, ipfs://
contentTypeNoMIME type, informational
idempotencyKeyNoDedupes retries of the same anchor request
contractAddressYesAttestationVault deployment to anchor into
sponsorSessionIdNoOptional second session that pays the dust fee
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 provided, the description fully carries behavioral disclosure. It reveals that only the sha256 and public metadata are committed, that the caller is responsible for storing the raw bytes, that anchoring is first-come-first-served per hash, and that the call returns immediately with a jobId while execution proceeds asynchronously. This is rich, non-obvious context beyond the schema.

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 with no wasted words. It front-loads the primary action, then packs essential caveats (storage responsibility, hash uniqueness, async behavior, related verification tool) into compact, high-value sentences.

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?

For a 10-parameter tool with no output schema, the description covers the critical user-facing contract: what is anchored, what the caller must handle, the async polling model, and the return values (jobId, status, documentId). Combined with the detailed schema, this is sufficient for an agent to select and invoke the tool correctly.

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 description coverage is 100%, so the schema already documents each parameter. The description adds meaningful cross-parameter context by explaining that sha256 and public metadata are the committed payload, while storageRef holds the actual bytes—clarifying the division of responsibility between these fields. It does not re-explain each parameter, which is appropriate given the schema's completeness.

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 opens with a specific verb and resource: 'Anchor a document content hash on the Midnight chain via the AttestationVault attest circuit.' It clearly distinguishes this from sibling tools like verify_document and get_job_status by framing the action as anchoring and mentioning the returned documentId for later verification.

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 workflow guidance: the caller must store the bytes at storageRef, the operation is async requiring polling get_job_status, and the returned documentId is used with verify_document. It does not explicitly name alternatives or say 'use this instead of X', but the contextual workflow is sufficiently directional.

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