Skip to main content
Glama

explorer_get_contract_code

Read-only

Retrieve the deployed bytecode for a contract address on a specified chain to inspect and verify smart contract logic.

Instructions

Get the deployed bytecode of a contract at a given address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainIdYesChain ID for the target network (required — no default for indexed data)
contractAddressYesContract address (0x-prefixed)
Behavior3/5

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

Annotations already declare readOnlyHint and openWorldHint, covering the safety and scope profile. The description adds no further behavioral context such as return format, potential errors, or prerequisites. It doesn't contradict the annotations, but it also doesn't enrich them beyond the basic operation.

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?

The description is one concise sentence that front-loads the verb and resource. Every word adds value, with no redundancy or filler. It is appropriately sized for the tool's simplicity.

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 simple nature of the tool, full schema coverage, and clear annotations, the description is nearly complete. It could arguably mention the return format (hex-encoded bytecode) since no output schema is present, but the term 'deployed bytecode' strongly implies this. No critical information is missing for basic usage.

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 description coverage is 100%, so both parameters are already documented in the input schema. The description only references 'at a given address' without adding new semantic details about the chainId or address format beyond what the schema provides. The baseline of 3 applies when the schema carries the explanatory burden.

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 states a specific action ('Get') on a specific resource ('deployed bytecode of a contract') with a location parameter ('at a given address'). It clearly distinguishes itself from sibling tools like explorer_get_contract_abi or explorer_get_contract_source, which retrieve different contract data.

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?

The description implies usage for retrieving contract bytecode but provides no explicit guidance on when to choose this tool over alternatives. No exclusions or alternative comparisons are mentioned, leaving the agent to infer based on the tool name and resource.

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/Apegurus/web3agent'

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