Skip to main content
Glama

Manifold Markets MCP Server

add_liquidity

Increase liquidity for a specific market on Manifold Markets by adding mana to its liquidity pool. Enter the market ID and desired mana amount to enhance market stability and trading efficiency.

Instructions

Add mana to market liquidity pool

Input Schema

NameRequiredDescriptionDefault
amountYesAmount of mana to add
marketIdYesMarket ID

Input Schema (JSON Schema)

{ "properties": { "amount": { "description": "Amount of mana to add", "type": "number" }, "marketId": { "description": "Market ID", "type": "string" } }, "required": [ "marketId", "amount" ], "type": "object" }

Implementation Reference

  • The main execution handler for the add_liquidity tool. Validates input with AddLiquiditySchema, authenticates with MANIFOLD_API_KEY, sends POST to Manifold API /add-liquidity endpoint, and returns success response.
    case 'add_liquidity': { const params = AddLiquiditySchema.parse(args); const apiKey = process.env.MANIFOLD_API_KEY; if (!apiKey) { throw new McpError( ErrorCode.InternalError, 'MANIFOLD_API_KEY environment variable is required' ); } const response = await fetch(`${API_BASE}/v0/market/${params.marketId}/add-liquidity`, { method: 'POST', headers: { 'Content-Type': 'application/json', Authorization: `Key ${apiKey}`, }, body: JSON.stringify({ amount: params.amount, }), }); if (!response.ok) { throw new McpError( ErrorCode.InternalError, `Manifold API error: ${response.statusText}` ); } return { content: [ { type: 'text', text: 'Liquidity added successfully', }, ], }; }
  • Zod validation schema defining input parameters for add_liquidity: marketId (string) and amount (positive number).
    const AddLiquiditySchema = z.object({ marketId: z.string(), amount: z.number().positive(), });
  • src/index.ts:290-301 (registration)
    Tool registration in the MCP server's tools list, including name, description, and input schema for list tools request.
    { name: 'add_liquidity', description: 'Add mana to market liquidity pool', inputSchema: { type: 'object', properties: { marketId: { type: 'string', description: 'Market ID' }, amount: { type: 'number', description: 'Amount of mana to add' }, }, required: ['marketId', 'amount'], }, },

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/bmorphism/manifold-mcp-server'

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