Skip to main content
Glama

abi encode

abi_encode
Read-only

Build EVM calldata from a function signature and arguments (e.g. transfer(address,uint256) + [to, amount]): returns the 0x data and selector, ready for a transaction or /v1/tx/simulate. Tuples and arrays supported via JSON args. Costs $0.002 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoJSON array, or | separated
signatureYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true is consistent with a pure encoding computation; openWorldHint=true). The description adds genuinely non-structured information: the exact return shape ('0x data and selector'), tuple/array support via JSON args, and the per-call cost of $0.002 USDC (x402).

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?

Front-loaded with the core verb and purpose, followed by the example, output shape, capability notes, and cost. It is a single dense sentence plus two short clauses with essentially no waste, though the cost sentence sits last where it is easy to skim past.

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?

No output schema exists, and the description appropriately covers the return value ('0x data and selector'). Cost, supported types, and downstream usage are all addressed for a 2-parameter tool with high sibling density; only the missing 'when to choose this over abi_decode' guidance keeps it from being fully complete.

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 only 50% — the required 'signature' parameter has no schema description at all. The description compensates by showing the signature format via example and clarifying that args accepts JSON (tuples/arrays), adding real meaning beyond the schema's terse 'JSON array, or | separated' note.

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+resource — 'Build EVM calldata from a function signature and arguments' — and the concrete example ('transfer(address,uint256) + [to, amount]') makes the operation unmistakable. It is cleanly the inverse of the sibling abi_decode, so an agent can distinguish them without opening either schema.

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?

Usage is only implied: the description notes the output is 'ready for a transaction or /v1/tx/simulate', which hints at the downstream context. It never states when to prefer this over abi_decode or what prerequisites the input must satisfy; the agent must infer the use case.

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