Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

follow_market

Manage market subscriptions on Manifold Markets by following or unfollowing specific prediction markets to track updates and activity.

Instructions

Follow or unfollow a market

Input Schema

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

Implementation Reference

  • Handler for follow_market tool: Parses input with FollowMarketSchema, checks for MANIFOLD_API_KEY, makes POST request to /v0/follow-contract with contractId and follow boolean, returns success message.
    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',
          },
        ],
      };
    }
  • Zod schema defining input for follow_market: contractId (string), follow (boolean).
    const FollowMarketSchema = z.object({
      contractId: z.string(),
      follow: z.boolean(),
    });
  • src/index.ts:349-360 (registration)
    Tool registration in listTools response, including name, description, and inputSchema matching the Zod schema.
    {
      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']
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('follow or unfollow') but lacks details on permissions required, side effects (e.g., notifications, data changes), rate limits, or response format. This is inadequate for a mutation tool with zero annotation coverage.

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 that directly states the tool's function without unnecessary words. It's front-loaded and appropriately sized, making it easy to parse quickly.

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?

Given the complexity of a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain behavioral traits, usage context, or return values, leaving significant gaps for an agent to understand how to invoke it correctly.

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?

The schema description coverage is 100%, with clear descriptions for both parameters ('Market ID' and 'True to follow, false to unfollow'). The description adds no additional meaning beyond what the schema provides, such as format examples or constraints, so it meets the baseline for high schema coverage.

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 ('follow or unfollow') and the resource ('a market'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential siblings like 'react' or 'get_market', which might involve similar market interactions, so it doesn't reach the highest 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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing market access or user authentication), exclusions, or how it relates to sibling tools like 'get_market' or 'react', leaving usage context unclear.

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