Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

add_liquidity

Add mana to a market's liquidity pool on Manifold Markets to facilitate trading and improve market stability.

Instructions

Add mana to market liquidity pool

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketIdYesMarket ID
amountYesAmount of mana to add

Implementation Reference

  • Handler for the 'add_liquidity' tool. Validates input using AddLiquiditySchema, requires MANIFOLD_API_KEY, sends POST request to Manifold Markets API to add liquidity to the specified market, and returns a 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',
          },
        ],
      };
    }
  • Zod schema defining the input parameters for the add_liquidity tool: 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 listTools handler, specifying name, description, and inputSchema for the MCP client.
    {
      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'],
      },
    },
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. While 'Add mana' implies a write/mutation operation, it doesn't specify whether this requires authorization, has rate limits, affects market dynamics, or what happens on failure. Significant behavioral context is missing for a financial transaction tool.

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 with zero wasted words. It's appropriately sized for a tool with two well-documented parameters and gets straight to the point without unnecessary elaboration.

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 financial transaction tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after adding liquidity (e.g., returns, confirmation, pool changes), error conditions, or system implications. The context requires more completeness for safe operation.

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%, with both parameters ('marketId' and 'amount') documented in the schema. The description adds minimal value beyond the schema by mentioning 'mana' as the currency, but doesn't provide additional context about parameter constraints, formats, 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 ('Add mana') and target resource ('market liquidity pool'), providing a specific verb+resource combination. However, it doesn't differentiate from the sibling tool 'remove_liquidity' which performs the opposite operation, 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?

No guidance is provided about when to use this tool versus alternatives like 'send_mana' or 'place_bet', nor about prerequisites such as market state or user permissions. The description only states what the tool does, not when it should be used.

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