Skip to main content
Glama
AnChainAI
by AnChainAI

get_smart_contract_code

Fetch and analyze smart contract source code and execution behavior to understand contract logic and on-chain activity for risk assessment.

Instructions

Analyze smart contract source code and related execution behavior to understand contract logic and activity.

Args: proto: Blockchain protocol (eth, bnb) contract_address: Smart contract address to analyze (e.g. 0xe924a9989d5bf8e8dea744deb390e6f4015b470c)

Cost: 300 credits

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
protoYes
contract_addressYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description must disclose behavioral traits. It does reveal the cost (300 credits), which is important for agents. However, it does not explicitly state that this is a read-only operation, nor does it mention any potential side effects, rate limits, or response behavior. The existence of an output schema helps, but the description itself is thin on operational transparency.

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 compact and well-structured: one main sentence for purpose, a concise Args block, and a cost line. There is no fluff, and the most important information is front-loaded. Every sentence earns its place, and the format is easy to parse.

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 a simple two-parameter tool with an output schema, the description is largely complete: it explains both parameters, notes the cost, and states the core purpose. It could be enhanced by mentioning expected outputs or error cases, but the output schema likely covers return values. The lack of usage guidance is a minor gap, but overall it is adequate for correct invocation.

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?

Since the input schema has zero description coverage, the Args section in the description is crucial. It explains 'proto' with example values (eth, bnb) and gives a concrete example for 'contract_address'. This adds meaning beyond the bare schema and helps the agent correctly populate both required 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?

The description clearly states the tool analyzes smart contract source code and related execution behavior, with a specific verb ('Analyze') and resource (smart contract). It distinguishes itself from siblings like get_contract_transaction, which focuses on transactions, and get_transaction_detail. The phrase 'related execution behavior' adds nuance but does not muddy the core purpose.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives. It does not mention any exclusions, prerequisites beyond the required parameters, or scenarios where a different tool might be preferred. Usage is only implied by the tool's purpose, but there is no actionable direction.

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/AnChainAI/anchain-data-mcp'

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