Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

react

Add or remove reactions (like/dislike) to markets or comments on Manifold Markets using an MCP interface, enabling interactive engagement with platform content.

Instructions

React to a market or comment

Input Schema

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

Implementation Reference

  • Handler function for the 'react' tool. Parses input using ReactSchema, makes POST request to Manifold API /v0/react endpoint with API key, handles errors, 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 definition for validating 'react' tool inputs: contentId (string), contentType (enum: 'comment' or 'contract'), optional remove (boolean), reactionType (enum: 'like' or 'dislike', defaults to 'like'). Used in handler for parsing.
    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 listTools handler. Defines name 'react', 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'] } },

Other Tools

Related 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