Sarek MCP Tools
The server exposes three tools, advertised through tools/list. Names are
snake_case and action-oriented. Every input is validated against a strict schema
before anything reaches Sarek: unknown fields are rejected, and malformed input
comes back as an actionable error instead of a failed upstream call.
sarek_stamp
Stamps a pre-computed SHA3-256 hash on-chain and returns a verifiable proof.
This tool takes a hash, not raw data. The agent hashes its data locally first so that raw data never leaves its environment in cleartext.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hash | string | Yes | The SHA3-256 hash of your data as 64 lowercase hex characters. This is the data to be stamped on-chain. |
Returns
| Field | Type | Description |
|---|---|---|
tx_hash | string | On-chain transaction hash of the stamp. |
ldgp | string | Base64-encoded .ldgp proof for the stamped hash. |
mmr_root | string | The root that was stamped on-chain. |
block_number | number | Block the stamp landed in, when known. |
on_chain | boolean | Whether the stamp is confirmed on-chain. |
Example
// input
{
"hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
}// result
{
"tx_hash": "0x4a7c2f...e91b",
"ldgp": "VEVSSFVB...base64...",
"mmr_root": "c1d2e3...f0",
"block_number": 10789522,
"on_chain": true
}Errors
Sending anything other than a 64-character lowercase hex hash returns an actionable
validation error telling the agent to hash its data locally first, without ever
contacting Sarek. Re-stamping a hash that already exists returns The resource already exists.
sarek_stamp is the one write operation. It is marked idempotent (the same hash
resolves to the same stamp) and is not read-only.
sarek_verify
Verifies a .ldgp proof against the on-chain record and returns a layered result.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ldgp | string | Yes | The base64-encoded .ldgp proof, exactly as returned by sarek_stamp or sarek_get_proof. |
data | string | No | Base64-encoded raw data. When provided, adds the data-integrity layer: Sarek checks that this data hashes to the proof leaf. |
hash | string | No | A leaf hash (64 lowercase hex) to check for membership in the proof. This is an existing leaf to look for, not data to be stamped. |
Returns
| Field | Type | Description |
|---|---|---|
valid | boolean | Overall verdict across all checked layers. |
layers | object | Per-layer breakdown (see below). |
leaf | string | The leaf hash the proof resolves to, when known. |
mmr_root | string | The root the proof resolves to, when known. |
The layers object contains:
| Field | Type | Description |
|---|---|---|
data_integrity | boolean | Raw data hashes to the proof leaf. Present only when data was supplied. |
tree_integrity | boolean | The proof’s path reconstructs the stamped root. |
on_chain | boolean | The root is anchored on-chain. |
on_chain_leaf | boolean | The specific leaf is provably included on-chain, when known. |
block_number | number | Block the stamp was anchored in, when known. |
block_date | string | ISO timestamp of the anchoring block, when known. |
Example
// input
{
"ldgp": "VEVSSFVB...base64...",
"data": "TG9hbiAjNDgyMSBhcHByb3ZlZA=="
}// result
{
"valid": true,
"layers": {
"data_integrity": true,
"tree_integrity": true,
"on_chain": true,
"on_chain_leaf": true,
"block_number": 10789522,
"block_date": "2026-06-12T00:00:00.000Z"
},
"leaf": "9f86d081...0a08",
"mmr_root": "c1d2e3...f0"
}See Verification for what each layer proves and when
valid is true.
Errors
A malformed or non-base64 ldgp returns a validation error before any upstream
call. sarek_verify is read-only and idempotent.
sarek_get_proof
Fetches the .ldgp proof for a previously stamped hash, base64-encoded and ready to
pass to sarek_verify.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
hash | string | Yes | The 64 lowercase hex SHA3-256 hash of a stamped leaf. |
Returns
| Field | Type | Description |
|---|---|---|
hash | string | The leaf hash the proof belongs to. |
ldgp | string | Base64-encoded binary .ldgp proof. |
Example
// input
{
"hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
}// result
{
"hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
"ldgp": "VEVSSFVB...base64..."
}Errors
A hash that was never stamped returns The requested resource was not found.
sarek_get_proof is read-only and idempotent.