Skip to main content
Glama
laszlopere

mcp-bytesmith

eth_selector

Derive the 4-byte function selector or 32-byte event topic from a Solidity signature.

Instructions

Derive the 4-byte function selector or 32-byte event topic from a signature.

Returns {kind, signature (canonicalized), selector} for functions, or {kind, signature, topic0} for events.

Example: eth_selector("transfer(address,uint256)") -> selector="0xa9059cbb".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signatureYesA Solidity function/event signature, e.g. 'transfer(address,uint256)'; parameter names, data locations, and type aliases (uint->uint256) are normalized to canonical ABI form.
kindNo'function' returns the 4-byte selector; 'event' returns the 32-byte topic0 (keccak of the canonical signature).function
Behavior4/5

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

No annotations are provided, so the description carries full behavioral disclosure. It transparently states the return structure (kind, signature, selector/topic0) and mentions canonicalization of signatures. However, it does not cover error cases (e.g., invalid signature) or performance characteristics.

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?

The description is highly concise: two sentences plus an example. It front-loads the core purpose and uses minimal, precise language. Every sentence adds value—introducing functionality, detailing return values, and illustrating with an example.

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?

For a simple derivation tool with no output schema, the description covers purpose, input parameter meaning, and return format. It provides sufficient context for an agent to use the tool correctly. Minor gaps include lack of error handling info, but overall completeness is strong.

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?

Input schema provides detailed descriptions for both parameters (signature normalization, kind enum), giving 100% schema description coverage. The description adds value by explaining the return format and providing an example, but does not significantly augment parameter semantics beyond 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?

The description clearly states the tool derives a 4-byte function selector or 32-byte event topic from a signature, with specific verb 'derive' and resource 'signature'. It distinguishes between function and event via the kind parameter and provides a concrete example, leaving no ambiguity.

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?

The description implies usage context (deriving selectors/topics for ABI encoding) but does not explicitly state when to use this tool versus alternatives like eth_hash or abi_codec. No when-not or exclusion criteria are given, leaving the agent to infer applicability.

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/laszlopere/mcp-bytesmith'

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