Skip to main content
Glama
laszlopere

mcp-bytesmith

abi_inspect

List an ABI's entries with their canonical signatures and selectors.

Instructions

List an ABI's entries with their canonical signatures and selectors.

Accepts a JSON ABI or human-readable declarations and returns BOTH forms for every entry, so it converts in either direction. Returns {count, entries, selectors, topics}: entries carries {type, name, signature (canonical), human, inputs, outputs} per entry plus selector for functions and errors, topic0 and anonymous for events, and stateMutability when known; inputs/outputs are JSON ABI shape, so feeding human-readable text in and reading them out is the human -> JSON ABI direction, and human is the reverse. selectors maps every 4-byte selector to its canonical signature and topics every topic0 — the lookup table eth_calldata, eth_log_decode and eth_revert_decode take as input. collisions is added only if two distinct signatures share a selector. constructor/fallback/receive entries carry no signature or selector, having none.

Example: abi_inspect("function transfer(address to, uint256 amount)") -> selectors={"0xa9059cbb": "transfer(address,uint256)"}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
abiYesA contract ABI in either representation: a JSON ABI (array of entries, or one entry object), or human-readable Solidity declarations (one string, or an array of them) such as 'function transfer(address to, uint256 amount)'. A stringified JSON array or object is accepted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.1

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so richly: it enumerates the return shape ({count, entries, selectors, topics}), the per-entry fields, the conditional `collisions` key, and the edge case that constructor/fallback/receive entries carry no signature or selector. This is exactly the disclosure a pure read-only tool needs.

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 first sentence front-loads the purpose, and subsequent sentences are dense with return-shape detail that earns its place given there is no output schema. It is somewhat long and packed, but not 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?

No output schema exists, so the description must document returns, and it does so completely — top-level keys, per-entry fields, conditional fields, edge cases, and a worked example. An agent has everything needed to call and interpret it.

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%, so the baseline is 3, but the description adds real meaning beyond the schema: it clarifies the tool converts in either direction and illustrates acceptance of human-readable and JSON forms, reinforced by a concrete example call.

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 up front: 'List an ABI's entries with their canonical signatures and selectors.' It goes further to explain the bidirectional conversion, which clearly distinguishes it from siblings like abi_codec, eth_selector, and eth_calldata.

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 clear context for use: accepts either ABI representation and returns both, and names eth_calldata, eth_log_decode, and eth_revert_decode as consumers of its `selectors`/`topics` output. However, it offers no explicit when-not guidance or direct routing against the most similar sibling (abi_codec).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.