Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

react

Add or remove likes and dislikes on Manifold Markets predictions and comments to express opinions and engage with content.

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

  • Handler for the 'react' tool: parses input with ReactSchema, checks for API key, sends POST to Manifold /v0/react endpoint, and returns success message.
    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', }, ], }; }
  • Zod schema defining the input parameters for the 'react' tool: contentId, contentType, optional remove flag, and reactionType.
    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)
    Tool registration in the listTools response, defining name, description, and JSON inputSchema matching the Zod 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'] } },

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