Skip to main content
Glama

Resolve a selector or event topic to a signature (paid $0.001)

selector_lookup

Resolve a 4-byte function selector or 32-byte event topic hash to its human-readable signature(s) via 4byte.directory and openchain.xyz, returning all matches with verified flag.

Instructions

PAID $0.001 (x402, USDC on Base). Resolve a 4-byte function selector (0x + 8 hex) OR a 32-byte event topic hash (0x + 64 hex) to its human-readable signature(s) via 4byte.directory + openchain.xyz. Returns all matches (selectors can collide) with a verified flag. Without payment returns the x402 challenge; pass x_payment to settle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesA 4-byte function selector (0x + 8 hex) or a 32-byte event topic hash (0x + 64 hex).
x_paymentNox402 payment payload (base64) for this PAID decode. If supplied it is forwarded as the X-PAYMENT header to settle the call and return the real result instead of a 402 challenge. Omit to get the price challenge first.
Behavior4/5

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

With no annotations, the description carries full disclosure burden. It transparently covers the paid nature ($0.001, x402, USDC), external data sources (4byte.directory + openchain.xyz), collision behavior ('all matches (selectors can collide)'), and the verified flag. It does not describe failure modes or rate limits, but key behavioral traits are disclosed.

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?

The description is three sentences, front-loaded with the cost and payment context, followed by operation and output/payment behavior. It is efficient and every sentence earns its place, though it is slightly dense with technical details.

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

Completeness4/5

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

The description covers input formats, external services, collision handling, verified flag, and the two-step payment challenge flow. Since there is no output schema, it gives a sufficient sense of what is returned. It omits the exact response shape and edge-case handling, but is adequate given the tool's scope.

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 coverage is 100% with detailed descriptions for both 'selector' and 'x_payment'. The description restates the payment flow but adds no unique parameter semantics beyond what the schema already provides. Baseline 3 is appropriate because the schema handles the parameter documentation fully.

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 clearly names the action ('Resolve') and the exact resource ('4-byte function selector (0x + 8 hex) OR a 32-byte event topic hash (0x + 64 hex)') to 'human-readable signature(s)'. This distinguishes it from sibling decoder tools like decode_calldata or decode_log by focusing on hash-to-signature lookup.

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?

The description gives clear context on when to use the tool (you have a selector or event topic hash) and explains the payment workflow ('Without payment returns the x402 challenge; pass x_payment to settle'). However, it does not explicitly mention alternatives or when not to use it, so it lacks explicit exclusions.

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/zvmzaretsky/onchain-decode-mcp'

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