Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

add_liquidity

Add mana to a prediction market's liquidity pool to improve trading conditions and earn fees.

Instructions

Add mana to market liquidity pool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketIdYesMarket ID
amountYesAmount of mana to add

Implementation Reference

  • Zod schema for add_liquidity tool input validation: marketId (string) and amount (positive number).
    const AddLiquiditySchema = z.object({
      marketId: z.string(),
      amount: z.number().positive(),
    });
  • src/index.ts:291-301 (registration)
    Tool registration entry for 'add_liquidity' with name, description, and inputSchema (marketId required string, amount required number).
      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'],
      },
    },
  • Handler for 'add_liquidity': parses args with AddLiquiditySchema, validates MANIFOLD_API_KEY, POSTs to /v0/market/{marketId}/add-liquidity with amount in body, returns success message.
    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',
          },
        ],
      };
    }
Behavior2/5

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

No annotations. Description implies mutation but lacks details on side effects, permissions, or consequences. Minimal behavioral disclosure.

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?

Single sentence with no waste. Could be more informative but achieves brevity.

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?

No output schema, no annotations. Description omits what 'mana' is, which market's pool, and expected result. Incomplete for a mutation tool.

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 already describes both parameters fully (100% coverage). Description adds no additional context beyond schema.

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?

Description clearly states verb 'Add', resource 'mana', and target 'market liquidity pool'. Distinct from siblings like 'remove_liquidity'.

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?

No guidance on when to use this tool vs siblings like 'remove_liquidity'. No prerequisites or scenarios described.

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

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