Skip to main content
Glama

Build an unsigned contract creation (nothing sent)

contract_build_creation
Read-onlyIdempotent

Build an unsigned EVM contract creation from bytecode plus optional constructor ABI and args (blocktools buildEvmTransfer create). Returns the initcode (data, no 'to'), initcode_keccak256, an approval of the initcode against that hash or a createHash you pin (blocktools evmApproveCall), a verifyTx check, and with 'from' the predicted address (deployer's pending nonce, blocktools evmCreateAddress). Value only for a payable constructor. Initcode is capped at 49152 bytes (EIP-3860). Creation is irreversible and the bytecode is not verified by SwapChan; say so. The user's own wallet signs and sends; SwapChan never does. Powered by blocktools (ABI coding). How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "chainId": "<chainId>",
      "bytecode": "<bytecode>"
    },
    "name": "contract_build_creation"
  }
}

Input Schema

NameRequiredDescriptionDefault
abiNoOptional ABI JSON to use instead of the Sourcify / Etherscan lookup (labelled as pasted; not checked against source).
argsNoArguments in order; arrays/tuples as JSON lists, big numbers as decimal strings.
fromNoDeployer address, for the predicted contract address
valueNoWei to send to the new contract (payable constructor only)
chainIdYesEVM chain id or name (1 eth, 8453 base, 42161 arbitrum, 10 optimism, 137 polygon, 56 bnb, 43114 avalanche, 59144 linea, 534352 scroll).
bytecodeYesCreation bytecode (0x hex), without constructor args
createHashNoExpected initcode keccak-256 to pin; a mismatch fails the verdict

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it enumerates what comes back (initcode with no 'to', initcode_keccak256, an approval against that hash or a pinned createHash, a verifyTx check, and a predicted deployer address from pending nonce). It also discloses the 49152-byte EIP-3860 cap, that creation is irreversible, and that bytecode is unverified — exactly the risk context an agent needs before encouraging a deploy.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action and its return shape, then layers constraints and warnings. Slightly overstuffed with provenance and playbook boilerplate ('Powered by blocktools (ABI coding)', the trailing workflow list) that isn't needed to call this tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description must explain return values — and it does, naming each artifact produced. Combined with the size cap, irreversibility note, and signing responsibility, an agent has everything needed to call this correctly and communicate the risk.

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?

Schema coverage is 100%, so the baseline is 3; the description earns extra by adding conditional meaning the schema lacks — 'with from' triggers the predicted address via pending nonce, 'value' applies only to a payable constructor, and 'createHash' turns the approval into a pinned-hash check that fails the verdict on mismatch.

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?

States a specific verb and resource ('Build an unsigned EVM contract creation from bytecode plus optional constructor ABI and args') and pins the underlying operation (blocktools buildEvmTransfer create). This clearly separates it from siblings like contract_encode_call, build_swap_tx, or broadcast_tx, which either encode generic calldata or send transactions.

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?

Makes the usage context explicit: it returns a built-but-unsigned artifact, 'the user's own wallet signs and sends; SwapChan never does', and points at swapchan_playbook for workflow composition. It does not explicitly state when to prefer contract_encode_call or when not to use this tool, so it stops short of full alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.