Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

follow_market

Track or stop tracking a Manifold prediction market. Provide the market ID and choose to follow for updates or unfollow.

Instructions

Follow or unfollow a market

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contractIdYesMarket ID
followYesTrue to follow, false to unfollow

Implementation Reference

  • Zod schema for follow_market tool: validates contractId (string) and follow (boolean).
    const FollowMarketSchema = z.object({
      contractId: z.string(),
      follow: z.boolean(),
    });
  • src/index.ts:349-360 (registration)
    Registration of the 'follow_market' tool with name, description, and inputSchema for MCP.
    {
      name: 'follow_market',
      description: 'Follow or unfollow a market',
      inputSchema: {
        type: 'object',
        properties: {
          contractId: { type: 'string', description: 'Market ID' },
          follow: { type: 'boolean', description: 'True to follow, false to unfollow' }
        },
        required: ['contractId', 'follow']
      }
    },
  • Handler for 'follow_market' tool: parses args with FollowMarketSchema, then POSTs to Manifold API /v0/follow-contract to follow or unfollow a market.
    case 'follow_market': {
      const params = FollowMarketSchema.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/follow-contract`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Key ${apiKey}`,
        },
        body: JSON.stringify({
          contractId: params.contractId,
          follow: params.follow,
        }),
      });
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `Manifold API error: ${response.statusText}`
        );
      }
    
      return {
        content: [
          {
            type: 'text',
            text: params.follow ? 'Now following market' : 'Unfollowed market',
          },
        ],
      };
    }
Behavior2/5

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

No annotations provided, so the description must disclose behavioral traits. It only states 'Follow or unfollow' without mentioning side effects, permission requirements, rate limits, or what happens on failure. Minimal 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?

Extremely concise single sentence that is front-loaded. However, it may be too brief, lacking necessary context. Efficient but on the edge of under-specification.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple toggle tool with only two parameters, the description is minimally adequate. However, without output schema or annotations, it could be more complete (e.g., mentioning that following a market adds it to user's watchlist).

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 coverage is 100% with descriptions for both parameters. The description adds no extra meaning beyond the schema; it essentially repeats the boolean behavior. Baseline score applies.

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?

Description clearly states the verb 'Follow or unfollow' and the resource 'a market', making the action specific. However, it does not differentiate from sibling tools like close_market or place_bet, though the action is distinct enough.

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 versus others, nor any prerequisites (e.g., user must be authenticated, market must exist). The description provides no context for selecting this tool over alternatives.

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