Skip to main content
Glama

byte_verify_payload

Read-onlyIdempotent

Verify a data payload by recomputing its keccak256 hash and comparing it to the on-chain EIP-712 attestation. Use before acting on byte-sourced data to confirm integrity and authenticity.

Instructions

Verify-before-act: confirm a data payload an agent is about to act on actually matches what the publisher cryptographically attested to on-chain. Recomputes keccak256 of the received bytes and compares it to the on-chain EIP-712 PayloadAttestation hash. ALWAYS call this on BYTE-sourced data before acting on it; if verified=false the bytes were tampered/corrupted in transit and MUST NOT be used. Anchor the check with EITHER expectedHash (an on-chain payloadHash you already hold, e.g. from byte_query_fact / byte_buy_data) OR txHash (the settlement tx — also recovers the attestation signer and confirms it is the named publisher). Read-only; no wallet or payment required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe exact payload bytes the agent received and is about to act on — the raw delivered string, or a 0x-prefixed hex byte string.
txHashNoSettlement tx hash whose on-chain BroadcastStreamed attestation to verify against. When provided, also recovers the EIP-712 signer and confirms it is the attesting publisher.
hashModeNoHow to hash structured payloads: 'raw' (keccak of the utf8 string, default — matches byte_publish_data) or 'canonical' (keccak of key-sorted, whitespace-free JSON).
expectedHashNoOn-chain payloadHash to verify against (0x + 64 hex), e.g. the payloadHash returned by byte_query_fact or byte_buy_data.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYesHuman-readable verdict an agent can surface when it acts or refuses
signerNoRecovered EIP-712 attestation signer (txHash mode)
sourceNoWhich anchor was used: 'txHash' or 'expectedHash'
txHashNoSettlement tx hash verified against (txHash mode)
expiredNoWhether the attestation's EIP-712 deadline has passed at check time — the same rule the contract enforces (block.timestamp > deadline). txHash mode only; absent in expectedHash mode, which carries no deadline. NOT folded into `verified`: the chain refuses to emit an already-expired attestation, so every historical settlement reads expired=true as a matter of course, and refusing those would break provenance audits without proving anything. verified answers 'did the publisher sign exactly these bytes'; expired answers 'is that attestation still inside its validity window'. If you need freshness, require verified && !expired.
deadlineNoAttestation deadline as UNIX seconds (decimal string) — txHash mode only
verifiedYesTrue only if the recomputed hash matches the on-chain attested hash AND (when a signer was recovered) the signer is the publisher. If false: do NOT act on the data.
checkedAtNoWall-clock time the expiry comparison was made, UNIX seconds (decimal string)
hashMatchYesWhether the recomputed hash equals the on-chain hash
blockNumberNoBlock number of the settlement tx (txHash mode)
onChainHashYesThe on-chain attested payloadHash compared against
signerMatchNoWhether the recovered signer is the attesting publisher
recomputedHashYeskeccak256 of the received bytes
attestingPublisherNoPublisher named in the on-chain event (txHash mode)
Behavior5/5

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

The description goes well beyond the readOnlyHint/idempotentHint annotations by explaining the exact mechanism (recompute keccak256 and compare to EIP-712 PayloadAttestation hash), the signer-recovery behavior when txHash is provided, and the operational consequence of verified=false. It also states 'Read-only; no wallet or payment required,' adding auth/context value.

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 compact yet information-dense. It front-loads the core purpose with 'Verify-before-act', immediately states the critical safety rule, then supplies anchoring options and read-only status. Each sentence contributes distinct value with no filler.

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?

Given the tool's moderate complexity, the description covers the full lifecycle: what it does, when it must be used, both verification modes, failure semantics, and read-only/auth implications. The presence of an output schema means return-value details are already handled, so the description is sufficiently complete.

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 adds meaningful usage semantics beyond the schema: expectedHash is sourced from byte_query_fact/byte_buy_data, txHash recovers the attestation signer, and hashMode 'raw' matches byte_publish_data. This enriches parameter understanding without duplicating the schema.

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 names a specific verb and resource: verify a data payload against an on-chain attestation hash. It clearly distinguishes this from sibling tools by framing it as the verify-before-act counterpart to publish/query/buy data operations.

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

Usage Guidelines5/5

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

Explicitly states when to call the tool ('ALWAYS call this on BYTE-sourced data before acting on it'), what to do on failure ('if verified=false the bytes were tampered/corrupted... MUST NOT be used'), and how to anchor the check with either expectedHash or txHash. This is strong, actionable usage guidance.

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/0rkz/byte-mcp-server'

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