Skip to main content
Glama
bmorphism

Manifold Markets MCP Server

search_markets

Search prediction markets by keyword, filter by open/closed/resolved status, and sort by newest, score, or liquidity.

Instructions

Search for prediction markets with optional filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termNoSearch query
limitNoMax number of results (1-100)
filterNo
sortNo

Implementation Reference

  • Zod schema for search_markets input validation, with optional fields: term, limit (1-100), filter (all/open/closed/resolved), sort (newest/score/liquidity).
    const SearchMarketsSchema = z.object({
      term: z.string().optional(),
      limit: z.number().min(1).max(100).optional(),
      filter: z.enum(['all', 'open', 'closed', 'resolved']).optional(),
      sort: z.enum(['newest', 'score', 'liquidity']).optional(),
    });
  • src/index.ts:214-225 (registration)
    Registration of the 'search_markets' tool in the ListToolsRequestSchema handler, defining its name, description, and input schema (term, limit, filter, sort).
    {
      name: 'search_markets',
      description: 'Search for prediction markets with optional filters',
      inputSchema: {
        type: 'object',
        properties: {
          term: { type: 'string', description: 'Search query' },
          limit: { type: 'number', description: 'Max number of results (1-100)' },
          filter: { type: 'string', enum: ['all', 'open', 'closed', 'resolved'] },
          sort: { type: 'string', enum: ['newest', 'score', 'liquidity'] },
        },
      },
  • Handler for the 'search_markets' tool call: parses params via Zod schema, constructs URL search params, fetches from Manifold API /v0/search-markets, and returns JSON results.
    case 'search_markets': {
      const params = SearchMarketsSchema.parse(args);
      const searchParams = new URLSearchParams();
      if (params.term) searchParams.set('term', params.term);
      if (params.limit) searchParams.set('limit', params.limit.toString());
      if (params.filter) searchParams.set('filter', params.filter);
      if (params.sort) searchParams.set('sort', params.sort);
    
      const response = await fetch(
        `${API_BASE}/v0/search-markets?${searchParams}`,
        { headers: { Accept: 'application/json' } }
      );
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `Manifold API error: ${response.statusText}`
        );
      }
    
      const markets = await response.json();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(markets, null, 2),
          },
        ],
      };
    }
Behavior2/5

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

No annotations exist, so the description must disclose safety and behavior. It only states 'search,' implying read-only, but does not confirm this or mention other traits like result limits, pagination, or error cases.

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 a single sentence of 6 words, which is concise but too brief to be effective. It lacks structure and front-loading of key details, resulting in under-specification rather than efficiency.

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?

With 4 parameters, no output schema, no annotations, and minimal description, the tool definition is incomplete. It does not specify return format, behavior of filters, or ordering, leaving significant gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50% (term and limit described, filter and sort not). The description adds only 'optional filters,' adding minimal meaning beyond the schema, failing to compensate for the uncovered parameters.

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 tool searches for prediction markets with optional filters. It distinguishes itself from siblings like get_market (single) and create_market, but does not explicitly contrast with other list tools, though none exist.

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 usage guidance is provided. The description lacks information on when to use this tool, when not to use it, or alternatives, leaving the agent without context for selection.

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