Skip to main content
Glama

Selector / encode

abi_utils
Read-only

Compute function selectors and event topics for a signature, and ABI-encode calls with arguments to prepare smart contract transactions.

Instructions

Compute a function selector & event topic for a signature, and optionally ABI-encode a call with args.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
signatureYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, indicating a safe read operation. The description adds no behavioral traits beyond what the annotations cover—no auth requirements, rate limits, side effects, or conditional behavior beyond the optional encoding step, which is already implied by the purpose.

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?

A single sentence that is front-loaded and free of filler. Every clause contributes to understanding the tool's purpose, making it appropriately sized for a utility of this simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no parameter descriptions in the schema, the description is too thin. It does not explain the expected signature format, what the returned selector/topic looks like, or how arguments should be structured for encoding, leaving significant gaps for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for the undocumented parameters. It names 'signature' and 'args' but provides no format details (e.g., function signature syntax), type information, or constraints, leaving key semantics undefined.

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?

The description states a specific verb and resource: compute a function selector and event topic from a signature, and optionally ABI-encode a call with args. It clearly conveys the utility's role, though it does not explicitly distinguish itself from siblings like decode_calldata or convert_units.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to use this tool versus alternatives. The description implies usage (compute selectors/encode calls) but offers no context, prerequisites, or exclusions, leaving the agent to infer from the tool name and purpose.

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