Skip to main content
Glama

chain_userop_hash

Read-only

ERC-4337 UserOperation hash (EntryPoint v0.6/v0.7/v0.8) — Compute the userOpHash a smart account signs and bundlers return, for EntryPoint v0.6, v0.7 (PackedUserOperation) and v0.8 (EIP-712), and cross-check it live against EntryPoint.getUserOpHash on Ethereum/Base/Arbitrum/Optimism/Polygon (verify=true default). Accepts the bundler JSON userOp (userop={...}) or individual params: sender, nonce, callData, initCode or factory+factoryData, callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, maxPriorityFeePerGas, paymasterAndData or paymaster+paymasterVerificationGasLimit+paymasterPostOpGasLimit+paymasterData, or packed accountGasLimits/gasFees. Returns the packed fields, nonce key/sequence, required prefund, factory/paymaster used. Params: chain (base|ethereum|arbitrum|optimism|polygon|chain id), entrypoint (0.6|0.7|0.8|address), sender. Price: $0.003 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chain": "<chain>",
      "entrypoint": "<entrypoint>",
      "sender": "<sender>",
      "nonce": "<nonce>",
      "callData": "<callData>"
    },
    "name": "chain_userop_hash"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesbase
nonceYes0
senderYes0xb8Cc8d6F2A1c3c47A2a0bB3c4a36A3b7a4d2E1F0
callDataYes0x
entrypointYes0.7

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover the read-only/non-destructive/open-world profile, and the description adds real behavior: it makes live on-chain EntryPoint.getUserOpHash calls on five named chains, defaults to verification, and charges $0.003 USDC via x402. Disclosing payment and the default network round-trip is material context an agent would otherwise miss.

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?

Purpose is front-loaded before the parenthetical versions and the param enumeration, and every sentence carries information. It is a dense single paragraph with some repetition of the version list and a long optional-param run-on that could be tidied, but nothing is padding.

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 no output schema, the description takes on the return contract and does so explicitly: packed fields, nonce key/sequence, required prefund, and which factory/paymaster was used. Combined with the chain/version coverage and pricing disclosure, an agent has what it needs to call this 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?

The schema has 100% description coverage, but those descriptions are bare examples ('base', '0', '0.7'); the prose adds genuine meaning — chain accepts names or chain id, entrypoint accepts 0.6|0.7|0.8 or a raw address, and it enumerates the optional packed/individual fields (initCode, factory+factoryData, gas limits, paymaster variants) beyond the five shown. It is not fully exhaustive on syntax per field, so a 4 rather than a 5.

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+resource: 'Compute the userOpHash a smart account signs and bundlers return,' and scopes it to EntryPoint v0.6/v0.7/v0.8. That is enough to separate it from siblings like chain_safe_tx_hash or the security_hash family without opening a schema.

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?

It states the two supported call styles (bundler JSON userop={...} or individual params) and that verify=true is the default for the live cross-check — useful context for choosing an invocation. It stops short of explicit when-not/exclusion guidance against sibling hash tools, so it is clear context rather than full routing guidance.

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.

Resources