Skip to main content
Glama

evm_write_contract

Destructive

Execute state-changing smart contract functions with ABI auto-resolution, registered label, or custom JSON. Confirmation-gated for safety.

Instructions

Execute a state-changing contract function. Provide abiLabel (from evm_register_abi), abiJson, or let the tool auto-resolve. Confirmation-gated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoFunction arguments as strings
valueNoOptional native amount in ether units
abiJsonNoOptional ABI JSON string
chainIdNoChain ID (defaults to runtime config)
abiLabelNoLabel of a registered ABI (from evm_register_abi)
functionNameYesState-changing function name
contractAddressYesContract address
Behavior4/5

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

The description adds behavioral context beyond the annotations: it notes the tool is 'Confirmation-gated' and explains ABI auto-resolution. This complements the destructiveHint: true annotation without contradicting it.

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 two sentences, front-loaded with the primary purpose, followed by key usage details. Every sentence adds value without redundancy.

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 100% schema description coverage and annotations indicating destructive behavior, the description adequately covers main contextual aspects: purpose, ABI resolution, and confirmation. It does not describe return values, but no output schema exists and the core behavior is sufficiently clear.

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?

Although the schema descriptions cover all parameters, the tool description adds meaning by explaining the relationship between abiLabel, abiJson, and auto-resolution. This clarifies the optionality and provenance of ABI-related parameters, supplementing the schema.

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 action ('Execute a state-changing contract function'), specifying both the verb and resource. The tool name and 'state-changing' distinguish it from read-only siblings like evm_read_contract.

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

Usage Guidelines4/5

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

The description provides clear context on how to invoke the tool, including ABI resolution options ('Provide abiLabel (from evm_register_abi), abiJson, or let the tool auto-resolve') and mentions it is confirmation-gated. It does not explicitly name alternatives or exclusions, but the context is clear enough.

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