Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

react

Like or dislike a market or comment on Manifold Markets, with the option to remove your reaction.

Instructions

React to a market or comment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentIdYesID of market or comment
contentTypeYesType of content to react to
removeNoOptional. True to remove reaction
reactionTypeNoType of reaction

Implementation Reference

  • Zod schema for the 'react' tool input validation: contentId (string), contentType (comment/contract), remove (optional boolean), reactionType (like/dislike with default 'like').
    const ReactSchema = z.object({
      contentId: z.string(),
      contentType: z.enum(['comment', 'contract']),
      remove: z.boolean().optional(),
      reactionType: z.enum(['like', 'dislike']).default('like'),
    });
  • src/index.ts:398-411 (registration)
    Registration of the 'react' tool as part of the ListToolsRequestSchema handler, defining its name, description, and JSON Schema input schema.
    {
      name: 'react',
      description: 'React to a market or comment',
      inputSchema: {
        type: 'object',
        properties: {
          contentId: { type: 'string', description: 'ID of market or comment' },
          contentType: { type: 'string', enum: ['comment', 'contract'], description: 'Type of content to react to' },
          remove: { type: 'boolean', description: 'Optional. True to remove reaction' },
          reactionType: { type: 'string', enum: ['like', 'dislike'], description: 'Type of reaction' }
        },
        required: ['contentId', 'contentType']
      }
    },
  • Handler for the 'react' tool execution. Parses args via ReactSchema, calls the Manifold API POST /v0/react with the API key, returns success message indicating whether the reaction was added or removed.
    case 'react': {
      const params = ReactSchema.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/react`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Key ${apiKey}`,
        },
        body: JSON.stringify(params),
      });
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `Manifold API error: ${response.statusText}`
        );
      }
    
      return {
        content: [
          {
            type: 'text',
            text: params.remove ? 'Reaction removed' : 'Reaction added',
          },
        ],
      };
    }
Behavior2/5

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

No annotations are present, so the description must disclose behaviors. It does not mention that reactions can be removed or that only 'like'/'dislike' are supported, nor the read/write nature of the operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise, consisting of a single short sentence. While efficient, it omits important details that could be included without verbosity.

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 4 parameters and no output schema or annotations, the description is too sparse. It fails to explain the effects of the 'remove' parameter or the meaning of reaction types.

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%, so the baseline is 3. The description adds no additional meaning beyond the schema, which already describes the parameters with enums and required fields.

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 'React' and the target resources 'market or comment', distinguishing it from sibling tools which are different actions like add_bounty or close_market. However, it could be more specific about the scope.

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 on when to use this tool versus alternatives, nor any when-not-to-use conditions. The description lacks context for selecting this tool over others.

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