Skip to main content
Glama
monad-vibe

Monad MCP Server

by monad-vibe

deploy-mon-contract

Deploy smart contracts on the Monad testnet by providing contract bytecode, ABI, and constructor arguments, enabling integration and testing on the blockchain.

Instructions

Deploy a smart contract on Monad testnet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
abiYesContract ABI
bytecodeYesContract bytecode
constructorArgsNoConstructor arguments

Implementation Reference

  • The handler function that executes the deployment of a smart contract on Monad testnet using viem wallet client.
        async ({ bytecode, abi, constructorArgs }) => {
            try {
                // Create wallet client
                const client = await createWallet();
    
                // Deploy contract
                const hash = await client.deployContract({
                    abi: JSON.parse(abi),
                    bytecode: bytecode as `0x${string}`,
                    args: constructorArgs || [],
                });
    
                return {
                    content: [
                        {
                            type: "text",
                            text: `Contract deployment transaction sent! Hash: ${hash}`,
                        },
                    ],
                };
            } catch (error) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `Failed to deploy contract. Error: ${error instanceof Error ? error.message : String(error)}`,
                        },
                    ],
                };
            }
        }
    );
  • Zod input schema defining parameters for contract deployment: bytecode, ABI, and optional constructor arguments.
    {
        bytecode: z.string().describe("Contract bytecode"),
        abi: z.string().describe("Contract ABI"),
        constructorArgs: z.array(z.any()).optional().describe("Constructor arguments"),
    },
  • Core registration of the 'deploy-mon-contract' tool using server.tool(), specifying name, description, input schema, and handler function.
    server.tool(
        "deploy-mon-contract",
        "Deploy a smart contract on Monad testnet",
        {
            bytecode: z.string().describe("Contract bytecode"),
            abi: z.string().describe("Contract ABI"),
            constructorArgs: z.array(z.any()).optional().describe("Constructor arguments"),
        },
        async ({ bytecode, abi, constructorArgs }) => {
            try {
                // Create wallet client
                const client = await createWallet();
    
                // Deploy contract
                const hash = await client.deployContract({
                    abi: JSON.parse(abi),
                    bytecode: bytecode as `0x${string}`,
                    args: constructorArgs || [],
                });
    
                return {
                    content: [
                        {
                            type: "text",
                            text: `Contract deployment transaction sent! Hash: ${hash}`,
                        },
                    ],
                };
            } catch (error) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `Failed to deploy contract. Error: ${error instanceof Error ? error.message : String(error)}`,
                        },
                    ],
                };
            }
        }
    );
  • Invocation of deployContractProvider within the contractProvider helper to register contract tools.
    deployContractProvider(server);
    contractEventProvider(server);
  • Invocation of contractProvider in main server initialization to register all contract tools including deploy-mon-contract.
    contractProvider(server);
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions 'testnet' which implies non-production use, but doesn't disclose critical traits like whether deployment is irreversible, requires gas fees, has rate limits, or returns a contract address. For a deployment tool, this is a significant gap.

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 a single, focused sentence with zero wasted words. It's appropriately sized for a straightforward deployment tool and front-loads the essential action and target environment.

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

Completeness2/5

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

For a contract deployment tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after deployment (e.g., returns contract address, transaction hash), error conditions, or environmental constraints. Given the complexity of smart contract deployment, more context is needed.

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 description coverage is 100%, so the schema already documents all three parameters adequately. The description adds no additional parameter context beyond what's in the schema (e.g., format examples, relationship between parameters). This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('deploy') and resource ('smart contract on Monad testnet'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'send-mon-transaction' which might also involve contract interactions, so it doesn't reach the highest score.

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 guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing ABI/bytecode), compare to other deployment methods, or specify use cases like testing vs production. This leaves the agent without context for tool selection.

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

Related 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/monad-vibe/monad-mcp-server'

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