Skip to main content
Glama

ScorpTech x402 Tools

Evm Selector Decode

evm_selector_decode
Read-onlyIdempotent

Decode EVM function selectors, calldata and event topics: looks up 4-byte selectors (or 32-byte event topics) in 4byte.directory plus a built-in table of well-known signatures, re-hashes every candidate with Keccak-256 to drop bad entries, and for full calldata ABI-decodes the arguments (address with EIP-55 checksum, uint/int as exact decimal strings, bool, bytes, string, arrays, tuples), ranking candidates that decode cleanly first. Also computes the selector/topic for a given signature. Returns JSON with: kind, selector, found, bestMatch, calldataBytes, decoded, candidateCount. Price: $0.005 USDC per successful call (x402, Base or Solana). Same tool over HTTPS: GET https://scorptech.it.com/api/x402/v1/evm-selector-decode

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "evm_selector_decode"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax candidates 1-50 (default 10)
topicNo32-byte event topic0 hash
calldataNoFull transaction input data (0x...), decoded against the candidates
selectorNo4-byte function selector, e.g. 0xa9059cbb
signatureNoA signature like transfer(address,uint256) to hash into its selector/topic

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description adds substantial behavior: an external dependency on 4byte.directory plus a built-in table, Keccak-256 re-hashing to discard bad candidates, clean-decode ranking, and per-type decoding conventions such as EIP-55 address checksums and decimal-string uints. It also discloses pricing ($0.005 USDC per successful call via x402 on Base or Solana) and an HTTPS fallback endpoint — exactly the cost/auth context annotations cannot express.

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 core capability and the returned field list are front-loaded ahead of pricing and the HTTPS URL. It is a dense, run-on paragraph, but nearly every clause carries actionable information; only the endpoint URL and pricing sentence could arguably be split or deferred.

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 a moderately complex tool, no output schema, and five optional parameters, the description compensates well by enumerating the exact response keys (kind, selector, found, bestMatch, calldataBytes, decoded, candidateCount). An agent knows the input modes, the external data source, and the result shape before calling.

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 100%, so the schema already documents all five parameters, and the description adds only indirect meaning (that calldata is decoded against candidates and that candidates are ranked, which contextualizes the limit parameter). It does not explain interaction rules such as what happens when both selector and calldata are supplied, or the default limit behavior beyond the schema's own note.

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 and resource ('Decode EVM function selectors, calldata and event topics') and enumerates the concrete operations: 4-byte selector lookup, 32-byte topic lookup, calldata ABI decoding, and reverse selector computation from a signature. This clearly separates it from siblings like abi_encode, evm_tx_info, and the other *_decode utilities.

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?

Usage is implied by the enumerated modes — lookup a selector, decode calldata, or hash a signature — and the description notes the reverse operation ('Also computes the selector/topic for a given signature'). However, it never states when to prefer this over evm_tx_info, abi_encode, or evm_logs, nor any exclusions or prerequisites, leaving the agent to infer selection.

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