Skip to main content
Glama
Baneado98

calldata-guardian

by Baneado98

decode_calldata

Decode EVM calldata to extract the function selector and arguments, revealing the function name and parameters for supply-chain relevant actions like approve, transfer, and permit.

Instructions

Decode a single piece of EVM calldata (the 4-byte selector + arguments) into its function and parameters. For full risk context (is the spender an EOA? is to a proxy?), use preview_transaction instead. Returns the function name and decoded args for the known supply-chain-relevant selectors (approve, permit, setApprovalForAll, transfer, transferFrom, increaseAllowance, transferOwnership, multicall).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoChain used to resolve token metadata (default ethereum).
toYesThe target contract address (0x...).
dataYesThe calldata to decode (0x...).
Behavior3/5

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

No annotations provided, so description carries burden. It mentions that decoding works for known supply-chain-relevant selectors, implying limitations. However, it does not disclose error handling, whether it validates calldata, or if it is state-changing (assumed read-only). Adequate but could be more specific.

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?

Two sentences, front-loaded with verb+resource, no fluff. Each sentence earns its place.

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, but description specifies return (function name, decoded args) and lists selectors. Adequate for the tool's simplicity, though could mention return format.

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?

Schema coverage is 100% so baseline is 3. Description adds value by explaining purpose and listing known selectors, but does not provide additional details beyond schema for the three parameters.

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?

Description clearly states the tool decodes EVM calldata into function name and parameters, specifying verb (decode), resource (calldata), and output. It distinguishes from sibling preview_transaction by noting risk context.

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

Usage Guidelines5/5

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

Explicitly tells when to use this tool (decoding calldata) and when to use the sibling (preview_transaction for risk context). Provides clear guidance on selecting between tools.

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/Baneado98/calldata-guardian'

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