Skip to main content
Glama

launch-token

Deploy a meme token on Solana using the Raydium launchpad via bonk-mcp MCP Server. Enter token details like name, symbol, description, and image URL to start.

Instructions

Launch a new meme token on Solana using Raydium launchpad

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesToken description
image_urlYesImage URL to use for token
nameYesToken name
symbolYesToken symbol/ticker
telegramNoTelegram group URL (optional)
twitterNoTwitter handle/URL (optional)
websiteNoWebsite URL (optional)

Implementation Reference

  • The async execute method that implements the core logic of the "launch-token" tool, including input validation, IPFS metadata preparation, token launching via Raydium, error handling, and response generation.
    async def execute(self, arguments: Dict) -> List[TextContent | ImageContent | EmbeddedResource]:
        """
        Execute the token launcher tool with the provided arguments
    
        Args:
            arguments: Dictionary containing token configuration
    
        Returns:
            List of content items with the result
        """
        # Extract arguments
        name = arguments.get("name")
        symbol = arguments.get("symbol")
        description = arguments.get("description")
        twitter = arguments.get("twitter", "")
        telegram = arguments.get("telegram", "")
        website = arguments.get("website", "")
        image_url = arguments.get("image_url", "")
    
        # Validate required arguments
        if not name or not symbol or not description or not image_url:
            return [TextContent(
                type="text",
                text="Error: Missing required parameters. Please provide name, symbol, description, and image_url."
            )]
    
        # Get the payer keypair from settings
        if not KEYPAIR:
            return [TextContent(
                type="text",
                text="Error: No keypair configured in settings. Please set the KEYPAIR environment variable."
            )]
    
        try:
            # Convert the private key to a Keypair
            private_key_bytes = base58.b58decode(KEYPAIR)
            payer_keypair = Keypair.from_bytes(private_key_bytes)
        except Exception as e:
            return [TextContent(
                type="text",
                text=f"Error: Invalid keypair format. {str(e)}"
            )]
    
        # Generate keypair for token mint
        mint_keypair = Keypair()
    
        # Prepare IPFS metadata - this handles image upload and metadata creation
        print(f"Preparing IPFS metadata for {name} ({symbol})...")
        uri = await prepare_ipfs(
            name=name,
            symbol=symbol,
            description=description,
            twitter=twitter,
            telegram=telegram,
            website=website,
            image_url=image_url
        )
    
        if not uri:
            return [TextContent(
                type="text",
                text="Error: Failed to prepare IPFS metadata. Please check your image URL and try again."
            )]
    
        # Launch token
        print(f"Launching token {name} ({symbol})...")
        launch_result = await launch_token_with_buy(
            payer_keypair=payer_keypair,
            mint_keypair=mint_keypair,
            name=name,
            symbol=symbol,
            uri=uri
        )
    
        # Process results
        if launch_result.get("error"):
            return [TextContent(
                type="text",
                text=f"Error launching token: {launch_result['error']}"
            )]
    
        # Format successful response
        mint_address = mint_keypair.pubkey()
        pdas = launch_result["pdas"]
    
        response_text = (
            f"๐Ÿš€ Successfully launched token: {name} ({symbol})\n\n"
            f"Mint Address: {mint_address}\n"
            f"Pool State: {pdas['pool_state']}\n"
            f"Token URI: {uri}\n"
            f"Image URL: {image_url}\n\n"
            f"Funded from account: {payer_keypair.pubkey()}\n\n"
            "---\n"
            "**[Test Info]**\n"
            f"๐Ÿงช Test Wallet: {TEST_SOLANA_WALLET}\n"
            f"๐Ÿงช Test Contract Address (CA): {TEST_SOLANA_CA}\n"
            f"๐Ÿงช Test Transaction Hash: {TEST_TRANSACTION_HASH}\n"
        )
    
        return [TextContent(
            type="text",
            text=response_text
        )]
  • JSON schema defining the input parameters (name, symbol, description, image_url required; twitter, telegram, website optional) for the launch-token tool.
    self.input_schema = {
        "type": "object",
        "properties": {
            "name": {"type": "string", "description": "Token name"},
            "symbol": {"type": "string", "description": "Token symbol/ticker"},
            "description": {"type": "string", "description": "Token description"},
            "twitter": {"type": "string", "description": "Twitter handle/URL (optional)"},
            "telegram": {"type": "string", "description": "Telegram group URL (optional)"},
            "website": {"type": "string", "description": "Website URL (optional)"},
            "image_url": {"type": "string", "description": "Image URL to use for token"}
        },
        "required": ["name", "symbol", "description", "image_url"]
    }
  • MCP server list_tools handler that registers and exposes the "launch-token" tool by returning its Tool definition.
    @server.list_tools()
    async def handle_list_tools() -> list[types.Tool]:
        """
        List available tools.
        Each tool specifies its arguments using JSON Schema validation.
        """
        return [
            token_launcher_tool.get_tool_definition()
        ]
  • MCP server call_tool handler that dispatches invocations of the "launch-token" tool to its execute method.
    @server.call_tool()
    async def handle_call_tool(
        name: str, arguments: dict | None
    ) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:
        """
        Handle tool execution requests.
        Tools can modify server state and notify clients of changes.
        """
        if name != "launch-token":
            raise ValueError(f"Unknown tool: {name}")
    
        if not arguments:
            raise ValueError("Missing arguments")
    
        # Execute the token launcher tool
        return await token_launcher_tool.execute(arguments)
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the action ('Launch') which implies a write/mutation operation, but fails to disclose critical behavioral traits such as required permissions, cost implications, irreversible effects, rate limits, or what the response looks like. This leaves significant gaps for an agent to understand the tool's behavior.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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?

Given this is a complex write operation (token launch) with no annotations and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions, costs, or response format, nor does it provide usage context. The 100% schema coverage helps with parameters, but overall context for safe and effective use is lacking.

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?

The description provides no parameter-specific information beyond what's already in the input schema, which has 100% coverage with clear descriptions for all 7 parameters. The baseline score of 3 reflects adequate schema documentation, but the description adds no additional semantic context about parameter usage or relationships.

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 ('Launch') and target resource ('new meme token on Solana using Raydium launchpad'), providing specific verb+resource. However, since there are no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, preventing a perfect 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, prerequisites, or exclusions. It simply states what the tool does without context about appropriate scenarios or limitations.

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/bjoernbonk/letsbonk_mcp_server'

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