Skip to main content
Glama

byte_verify_payload

Read-onlyIdempotent

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)

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint/idempotentHint annotations, the description discloses the verification algorithm, the consequence of a failed check (tampered/corrupted), and the signer-recovery behavior when txHash is provided. It also states 'Read-only; no wallet or payment required', adding clarity that no transaction is needed.

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 dense but every sentence earns its place: purpose, algorithm, mandatory usage, failure handling, and parameter guidance. It is front-loaded with 'Verify-before-act' and remains readable despite being safety-critical.

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?

With an output schema present, the description correctly avoids re-explaining return values. It covers the tool's purpose, usage rules, verification logic, parameter selection, and non-destructive nature. Combined with annotations and the 100% schema coverage, no gaps remain.

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?

The input schema already describes all four parameters in detail (100% coverage), so the baseline is 3. The description adds the meaningful EITHER/OR relationship between expectedHash and txHash, and clarifies that 'data' is the exact received payload bytes. This elevates it to a 4.

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 'Verify-before-act: confirm a data payload...' and specifies the exact operation: recompute keccak256 and compare to the on-chain EIP-712 PayloadAttestation hash. It clearly distinguishes this from sibling tools by naming it as the verification step for BYTE-sourced data and referencing expectedHash from byte_query_fact/byte_buy_data.

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?

The description gives an explicit when-to-use: 'ALWAYS call this on BYTE-sourced data before acting on it'. It also provides a clear safety rule (if verified=false, bytes MUST NOT be used) and explains the two alternative anchoring parameters (expectedHash or txHash), with txHash additionally recovering the signer.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool targets a distinct action or resource, and overlapping functions (buy_data vs subscribe, check_subscription vs list_my_subscriptions) are explicitly differentiated in descriptions. No two tools appear to do the same thing.

Naming Consistency4/5

Most tools follow the byte_verb_noun pattern (e.g., byte_buy_data, byte_get_publisher), but a few deviate: byte_subscription_health uses a noun phrase, and byte_unsubscribe lacks an explicit object. The consistent byte_ prefix keeps the set recognizable.

Tool Count5/5

15 tools is at the upper edge of the well-scoped range, and each tool serves a distinct purpose within the PayPerByte protocol—discovery, purchasing, publishing, verification, and account management. No redundant or filler tools.

Completeness4/5

Core lifecycle coverage is strong: list/search, subscribe/unsubscribe, buy, publish, register, verify, health, and network stats. Minor gaps exist, such as no explicit tool to fetch historical streamed messages or update a publisher schema, but these are workable.