Skip to main content
Glama
tools.js1.13 kB
const { z } = require("zod"); const {handleSuccess, handleError} = require("../../../utils/helper"); const {getDDDDTokenPrice, getTokenPriceByAddress} = require("../../services/price"); const {newLaunch} = require("../../services/launch"); const registerLaunchTools = (mcpServer) => { mcpServer.tool("launch_token", "Create and launch a token", { name:z.string().describe("token name"), symbol:z.string().describe("token symbol"), totalSupply:z.number().positive().describe("total amount of tokens"), extra:z.any().optional().describe("other params") }, async ({name, symbol, totalSupply, extra}) => { try { console.log("launch_token", name, symbol, totalSupply, extra); const result = await newLaunch(extra.userId, name, symbol, totalSupply, 36000, 0); //const result = await getDDDDTokenPrice(); //const result = [{id:1,tweet:"123123"}, {id:2,tweet:"321321"}] return handleSuccess(result) } catch (e) { return handleError(e.toString()); } }) } module.exports = {registerLaunchTools}

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/dddd-community/hexiaoyi-mcp-js'

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