Skip to main content
Glama

Function selector and event topic

util_selector

Turns a Solidity signature like transfer(address,uint256) into its 4-byte function selector and its 32-byte event topic0. What you need to build calldata by hand or to filter logs. $0.005 per call, paid over x402 (USDC).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signatureYesCanonical signature: name(type1,type2), no spaces and no argument names.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the burden, and it discloses the cost model ($0.005 per call, paid over x402 in USDC) — non-obvious operational context an agent must know before calling. It does not cover failure behavior for malformed signatures or confirm determinism/idempotency, so it stops short of full disclosure.

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 short sentences: purpose first, then use case, then cost. Every sentence earns its place and nothing is padded.

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?

The description explains both return values (4-byte selector, 32-byte topic0) even though no output schema exists, and the single input parameter is fully specified by the schema. Nothing needed to invoke it correctly is missing.

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 format rules (canonical, no spaces, no argument names) are already documented. The description adds an inline example signature, which reinforces the expected shape but adds no syntax beyond the schema.

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?

States a specific verb and resource: converting a Solidity signature to a 4-byte selector and 32-byte topic0. This cleanly distinguishes it from neighbors like util_keccak256 (raw hash) and util_hex, which do not compute selectors.

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?

Gives concrete use cases ('build calldata by hand', 'filter logs'), which tells the agent when this tool is the right pick. It stops short of naming an alternative tool or stating exclusions, 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