Skip to main content
Glama

x402 Toolbox

Function selector and event topic for a Solidity signature

evm_selector
Read-onlyIdempotent

Function selector and event topic for a Solidity signature. Normalizes a function/event/error signature (drops parameter names, expands uint to uint256, handles tuples and arrays) and returns the 4-byte selector and the 32-byte event topic. No network access. Price: $0.003 USDC per call via x402 (eip155:8453).

Input Schema

NameRequiredDescriptionDefault
signatureYese.g. transfer(address to, uint256 amount)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, and open-world status. The description adds meaningful context beyond those: normalization rules (parameter names dropped, uint expanded, tuples/arrays handled), no network access, and the x402 payment requirement with price and chain.

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?

Three efficient sentences, front-loaded with the core purpose and followed by normalization behavior and payment context. Every sentence earns its place for an agent deciding whether and how to call the tool.

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?

For a one-parameter computational utility, the description says what it returns (4-byte selector, 32-byte topic), how input is normalized, that it is offline, and what it costs. Combined with annotations, nothing essential is missing even though there is no output schema.

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?

Schema coverage is 100% and the schema gives an example signature. The description adds value beyond the schema by explaining how the signature is normalized before hashing, which is directly relevant to the single required parameter.

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?

States a specific verb+resource: computes the function selector and event topic from a Solidity signature, and enumerates normalization behavior. It does not differentiate from the sibling evm_selector_lookup, so an agent cannot tell from the description which one to use.

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 purpose: when you have a Solidity signature and need its selector/topic. There is no explicit when-to-use or when-not guidance, and the presence of the sibling evm_selector_lookup makes the lack of differentiation a real gap.

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.