Skip to main content
Glama

EIP-712 hash / verify

eip712_hash
Read-only

Hash EIP-712 typed data to produce digest, domain separator, and struct hash; recover a signer from a signature and verify ERC-1271 signatures on smart accounts.

Instructions

Hash EIP-712 typed data (digest, domain separator, struct hash) and, if a signature is given, recover the signer; optionally check ERC-1271 isValidSignature on a smart account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
erc1271No
signatureNo
typedDataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint and openWorldHint, so safety is already covered; the description adds real behavioral context by disclosing that supplying a signature triggers signer recovery and that erc1271 triggers an on-chain isValidSignature check on a smart account. It still omits error behavior (e.g., what happens on an invalid signature) and the exact response shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One tightly packed sentence that front-loads the core action and appends the conditional branches in logical order. No wasted words, though the semicolon-chained clauses require careful parsing.

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

Completeness3/5

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

For a read-only tool with nested objects, three params, and no output schema, the description covers the main action and branches but leaves the typedData structure and the return format undocumented. It is adequate but not complete for correct invocation.

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 description coverage is 0%, so the description must carry the burden. It clarifies the role of signature (recover signer) and erc1271 (smart-account validity check), but says nothing about the required typedData object's internal structure (types, domain, message, primaryType) or the chain enum, leaving a meaningful gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Hash EIP-712 typed data') and enumerates the three hash outputs (digest, domain separator, struct hash), so an agent knows exactly what the tool produces. It does not, however, distinguish itself from the sibling verify_message, which covers overlapping signature-verification ground.

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

Usage Guidelines3/5

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

Conditional behavior is implied ('if a signature is given...', 'optionally check ERC-1271'), which hints at when each branch applies, but there is no explicit when-to-use guidance and no routing against the close sibling verify_message. Usage must be inferred from the branch conditions alone.

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