Skip to main content
Glama

contract_deploy

Deploy a smart contract by sending full creation calldata from a KMS signer. Returns the deterministic contract address synchronously without polling.

Instructions

Deploy a smart contract from a KMS signer (signs a contract-creation tx with to: null + data: bytecode). The bytecode is full creation calldata — creation bytecode + ABI-encoded constructor args, concatenated client-side (run402 does NOT compile Solidity). Returns the deterministic CREATE address synchronously in contract_address — known before confirmation, no polling needed to know where the contract lives. Same pricing as contract_call: chain gas at-cost + $0.000005 KMS sign fee.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesEVM chain (must match the signer's chain)
valueNoOptional native-token value in wei to attach to the deploy (decimal string)
bytecodeYesFull creation calldata as 0x-prefixed hex (creation bytecode + ABI-encoded constructor args, concatenated client-side). Non-empty, even-length, ≤ 128 KB. run402 does NOT compile Solidity.
signer_idYesThe KMS signer ID (cwlt_...) that will sign + own the new contract
project_idYesThe project ID
idempotency_keyNoOptional idempotency key — same key + same bytecode returns same call_id without re-broadcasting
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses key behaviors: synchronous return of contract_address before confirmation (no polling needed), pricing details, and that bytecode must be pre-compiled. Missing are authorization requirements (e.g., KMS signer existence) and failure behavior, but overall it provides adequate transparency for most use cases.

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 concise (three sentences) and well-structured. It front-loads the primary action and progressively adds details. Every sentence serves a purpose: action+mechanism, bytecode specification, and return behavior+pricing. No redundancy or fluff.

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 no output schema, the description adequately explains the return value (contract_address). It also mentions pricing and deterministic address. However, it could be more complete by mentioning error conditions, confirmation status, or required permissions. For a deployment tool, it covers essential aspects but lacks some edge-case details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and the description adds significant value beyond schema fields. For 'bytecode', it explains it is full creation calldata including constructor args, must be 0x-prefixed hex, and size limit. It clarifies 'value' is optional native token in wei, and 'idempotency_key' behavior. This helps the agent understand parameter semantics deeply.

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's function: 'Deploy a smart contract from a KMS signer'. It details the mechanism (signs a contract-creation tx) and specifies that it returns the deterministic CREATE address. It also distinguishes itself by noting it does NOT compile Solidity and has same pricing as contract_call.

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 explains when to use the tool (to deploy a smart contract) and provides context for bytecode preparation (client-side concatenation, run402 does not compile). It mentions same pricing as contract_call, implicitly guiding against using contract_call for deployment. However, it lacks explicit when-not-to-use guidance or alternative tools beyond the pricing reference.

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/kychee-com/run402-mcp'

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