Skip to main content
Glama

1s_contract_code

Retrieve the deployed bytecode of a contract address. Returns '0x' for externally owned accounts, helping distinguish contracts from EOAs.

Instructions

Get the deployed bytecode of a contract via eth_getCode. Returns '0x' for EOA (non-contract) addresses. Bytecode can be very large for complex contracts. Prefer 1s_proxy_detect or 1s_contract_info_live for type checks without fetching full bytecode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesEthereum address (0x...)
networkNoBlockchain network: "ethereum" (default), "sepolia", "avax"
Behavior4/5

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

Discloses return behavior ('0x' for EOA), large bytecode potential, and method used. Lacks details on default network or error handling, but sufficient for basic understanding.

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?

Three short, front-loaded sentences with no fluff; each sentence adds essential value.

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?

Covers key aspects: purpose, method, return for EOAs, and caveat about large bytecode. Does not explicitly state that bytecode is a hex string, but implied.

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 already covers both parameters with descriptions; description adds no new parameter-level meaning but provides helpful context on bytecode size and alternatives.

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?

Clearly states it retrieves deployed bytecode via eth_getCode, distinguishes from sibling tools by mentioning alternatives for type checks.

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 advises when to use and when to prefer alternatives (1s_proxy_detect, 1s_contract_info_live), providing context for appropriate usage.

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/blockparty-global/1s-mcp'

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