Skip to main content
Glama

Looking up prediction market

prediction_market_lookup
Read-onlyIdempotent

Search Polymarket for events and markets by name, topic, URL, or slug.

PM building blocks:

  • An event is a grouped prediction topic containing many child markets.

  • A market is one tradable outcome with its own marketId.

  • Example: 2026 NCAA Tournament Winner is an event; Will Duke win the 2026 NCAA Tournament? is a market. Detail tools require marketId, not eventId.

When to use:

  • First tool when the user asks about a specific PM topic, event, slug, or Polymarket URL but does not provide marketId.

  • Optionally provide queryVariant as a cleaner short keyword version.

  • Set includeEventMarkets to true to also return child markets for the best-matching event.

  • Do NOT use general_search for prediction markets.

  • Results include current outcome prices, last trade price, and bid/ask inline — for a quick probability check you may not need prediction_market_ohlcv. For price history or dated moves, still use prediction_market_ohlcv.

Query tips:

  • Uses Polymarket's search API — natural language queries work well.

  • Prefer short 1–3 keyword queries for best results.

  • Avoid broad multi-topic queries like bitcoin ethereum politics.

Output rules:

  • If lookup returns no suitable market or a mismatched timeframe, say so explicitly — do not silently substitute a nearby market.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "request": "<request>"
    },
    "name": "prediction_market_lookup"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestYesRequest for resolving prediction market names, events, slugs, or URLs.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / request / additionalProperties
      Added value: +false
    • removedInput schema / properties / request / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "description": "Request for resolving prediction market names, events, slugs, or URLs.",
      -    "properties": {
      -      "includeEventMarkets": {
      -        "default": true,
      -        "description": "When true, also include child markets for the best-matching event. Useful for event-level questions where market detail tools need the full market slate.",
      -        "type": "boolean"
      -      },
      -      "maxCandidates": {
      -        "default": 5,
      -        "description": "Maximum number of market and event candidates to return.",
      -        "maximum": 10,
      -        "minimum": 1,
      -        "type": "integer"
      -      },
      -      "maxEventMarkets": {
      -        "default": 12,
      -        "description": "Maximum number of child markets to show when includeEventMarkets is true. The output always states how many of the event's total markets are shown.",
      -        "maximum": 50,
      -        "minimum": 1,
      -        "type": "integer"
      -      },
      -      "page": {
      -        "default": 1,
      -        "description": "Page number for paginated results.",
      -        "minimum": 1,
      -        "type": "integer"
      -      },
      -      "query": {
      -        "description": "Prediction market name, topic, Polymarket URL, or URL slug to resolve to candidate market IDs.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "queryVariant": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Optional second short query variant to search alongside query, such as a cleaner keyword version of a slug."
      -      },
      -      "status": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": "active",
      -        "description": "Optional lifecycle filter for markets/events. Defaults to 'active'. Use 'all' to include closed markets."
      -      }
      -    },
      -    "required": [
      -      "query"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / request / description
      Added value: +"Request for resolving prediction market names, events, slugs, or URLs."
    • addedInput schema / properties / request / properties
      Added value: +{
      +  "includeEventMarkets": {
      +    "default": true,
      +    "description": "When true, also include child markets for the best-matching event. Useful for event-level questions where market detail tools need the full market slate.",
      +    "type": "boolean"
      +  },
      +  "maxCandidates": {
      +    "default": 5,
      +    "description": "Maximum number of market and event candidates to return.",
      +    "maximum": 10,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  "maxEventMarkets": {
      +    "default": 12,
      +    "description": "Maximum number of child markets to show when includeEventMarkets is true. The output always states how many of the event's total markets are shown.",
      +    "maximum": 50,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  "page": {
      +    "default": 1,
      +    "description": "Page number for paginated results.",
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  "query": {
      +    "description": "Prediction market name, topic, Polymarket URL, or URL slug to resolve to candidate market IDs.",
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "queryVariant": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": null,
      +    "description": "Optional second short query variant to search alongside query, such as a cleaner keyword version of a slug."
      +  },
      +  "status": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ],
      +    "default": "active",
      +    "description": "Optional lifecycle filter for markets/events. Defaults to 'active'. Use 'all' to include closed markets."
      +  }
      +}
    • addedInput schema / properties / request / required
      Added value: +[
      +  "query"
      +]
    • addedInput schema / properties / request / type
      Added value: +"object"
  2. Changed3 schema fields changed
    • removedInput schema / $defs
      Removed value: -{
      -  "PredictionMarketLookupRequest": {
      -    "description": "Request for resolving prediction market names, events, slugs, or URLs.",
      -    "properties": {
      -      "includeEventMarkets": {
      -        "default": true,
      -        "description": "When true, also include child markets for the best-matching event. Useful for event-level questions where market detail tools need the full market slate.",
      -        "type": "boolean"
      -      },
      -      "maxCandidates": {
      -        "default": 5,
      -        "description": "Maximum number of market and event candidates to return.",
      -        "maximum": 10,
      -        "minimum": 1,
      -        "type": "integer"
      -      },
      -      "maxEventMarkets": {
      -        "default": 12,
      -        "description": "Maximum number of child markets to show when includeEventMarkets is true. The output always states how many of the event's total markets are shown.",
      -        "maximum": 50,
      -        "minimum": 1,
      -        "type": "integer"
      -      },
      -      "page": {
      -        "default": 1,
      -        "description": "Page number for paginated results.",
      -        "minimum": 1,
      -        "type": "integer"
      -      },
      -      "query": {
      -        "description": "Prediction market name, topic, Polymarket URL, or URL slug to resolve to candidate market IDs.",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "queryVariant": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Optional second short query variant to search alongside query, such as a cleaner keyword version of a slug."
      -      },
      -      "status": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": "active",
      -        "description": "Optional lifecycle filter for markets/events. Defaults to 'active'. Use 'all' to include closed markets."
      -      }
      -    },
      -    "required": [
      -      "query"
      -    ],
      -    "type": "object"
      -  }
      -}
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "$ref": "#/$defs/PredictionMarketLookupRequest"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "Request for resolving prediction market names, events, slugs, or URLs.",
      +    "properties": {
      +      "includeEventMarkets": {
      +        "default": true,
      +        "description": "When true, also include child markets for the best-matching event. Useful for event-level questions where market detail tools need the full market slate.",
      +        "type": "boolean"
      +      },
      +      "maxCandidates": {
      +        "default": 5,
      +        "description": "Maximum number of market and event candidates to return.",
      +        "maximum": 10,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "maxEventMarkets": {
      +        "default": 12,
      +        "description": "Maximum number of child markets to show when includeEventMarkets is true. The output always states how many of the event's total markets are shown.",
      +        "maximum": 50,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "page": {
      +        "default": 1,
      +        "description": "Page number for paginated results.",
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "query": {
      +        "description": "Prediction market name, topic, Polymarket URL, or URL slug to resolve to candidate market IDs.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "queryVariant": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Optional second short query variant to search alongside query, such as a cleaner keyword version of a slug."
      +      },
      +      "status": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": "active",
      +        "description": "Optional lifecycle filter for markets/events. Defaults to 'active'. Use 'all' to include closed markets."
      +      }
      +    },
      +    "required": [
      +      "query"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, so the safety profile is covered. The description still adds real behavioral context beyond them: results carry current outcome prices, last trade price, and bid/ask inline, and there is an explicit failure-mode rule ('if lookup returns no suitable market or a mismatched timeframe, say so — do not silently substitute a nearby market'), which guards against a common agent error.

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

Conciseness4/5

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

Well structured with bolded section headers and the most decision-relevant content (what it searches, when to use it) front-loaded. Minor inefficiency: the query-tips section slightly conflicts in emphasis ('natural language queries work well' vs 'prefer short 1–3 keyword queries'), which costs a bit of clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists and the annotations carry the safety profile, so the description does not need to restate return shapes. What remains — the event/market taxonomy, identifier requirements for downstream tools, fallback behavior, and escalation to the OHLCV tool — is all present, leaving nothing essential for a correct first call.

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 description coverage is 100%, so every parameter is already documented in the schema, which sets the baseline at 3. The description reinforces `queryVariant` and `includeEventMarkets` with usage rationale, but says nothing about `status`, `maxCandidates`, `maxEventMarkets`, or `page` beyond what the schema already states, so it does not materially exceed the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search Polymarket for events and markets') plus the accepted identifiers (name, topic, URL, slug). It further disambiguates the two domain objects (event vs market) with a concrete example and notes that detail tools need `marketId`, not `eventId` — enough for an agent to pick it apart from `prediction_market_ohlcv` or `general_search`.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit 'When to use' section (first tool when no `marketId` is supplied), an explicit exclusion ('Do NOT use `general_search` for prediction markets'), and a routing rule to `prediction_market_ohlcv` for price history or dated moves. Both the positive and negative conditions are spelled out rather than inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources