Skip to main content
Glama
laszlopere

mcp-bytesmith

abi_codec

ABI-encode values or decode ABI-encoded call, return, or log data. Supports typed arrays, standard and packed encoding.

Instructions

ABI-encode values or ABI-decode call/return/log data.

types is a list of ABI type strings (e.g. ["uint256", "address", "(uint8,bytes)[]"]); aliases like uint/int/byte are normalized. action=encode (needs values) -> {encoded, mode}. mode=packed is abi.encodePacked (tight, no padding) and is encode-only. action=decode (needs data, standard only) -> {values}; ints are returned as decimal strings and addresses EIP-55 checksummed.

Example: abi_codec("encode", ["uint256"], [69]) -> encoded="0x00..0045" (the 32-byte word 0x...0045).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes'encode' values to ABI bytes, or 'decode' ABI bytes.
typesYesList of ABI type strings, e.g. ["uint256","address","(uint8,bytes)[]"]; aliases uint/int/byte are normalized. A stringified JSON array is accepted.
valuesNoValues to encode (required for action=encode), positionally matching `types`; ints accept int/decimal/0x-hex, bytes are 0x-hex, addresses are 0x-hex. A stringified JSON array is accepted.
dataNo0x-prefixed ABI-encoded bytes to decode (required for action=decode).
modeNo'standard' head/tail ABI encoding, or 'packed' (abi.encodePacked: tight, no padding/length prefixes) — packed is encode-only as it is not uniquely decodable.standard
Behavior4/5

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

No annotations exist, so the description carries the burden. It discloses output formats for decoding (decimal strings, checksummed addresses) and the fact that packed mode is encode-only. Behavioral traits like error handling or performance are not covered, but key behaviors are explained.

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 description is concise with two short paragraphs and an example. It is front-loaded with the purpose. Some information is repeated from the schema but overall efficient.

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?

Given the 5 parameters and full schema descriptions, the description covers actions, modes, types, and output format. It lacks error handling or constraints but is sufficiently complete for a encoding utility.

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% with parameter descriptions. The description adds value beyond the schema by explaining value formats, providing an example, and clarifying packed mode limitations.

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 explicitly states 'ABI-encode values or ABI-decode call/return/log data', which clearly defines the tool's functionality and distinguishes it from sibling tools like generic encode/decode or rlp_codec.

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?

The description explains when to use encode vs decode and the packed vs standard mode, but does not explicitly exclude non-ABI use cases. However, the purpose is clear enough for an agent to infer usage context.

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