Skip to main content
Glama

get_top_markets

Retrieve active Polymarket prediction markets by trading volume with current probability data. Filter by category to analyze specific market trends.

Instructions

Get the most active Polymarket markets by volume with current probabilities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of markets to return (default: 10)
categoryNoFilter by category (politics, crypto, sports, economics, etc.)

Implementation Reference

  • The execution logic for the get_top_markets tool, which fetches data from the LPXPoly API and formats it for the MCP response.
    case "get_top_markets": {
      const { limit, category } = args as any;
    
      const result = await callLPXPoly("/api/markets", {
        limit: limit || 10,
        category,
      });
    
      const markets = result.markets || result;
      if (!markets?.length) {
        return {
          content: [{ type: "text", text: "No markets found." }],
        };
      }
    
      const formatted = markets
        .map(
          (m: any, i: number) =>
            `${i + 1}. ${m.question}\n   Probability: ${(m.probability * 100).toFixed(1)}% | Volume: $${(m.volume || 0).toLocaleString()}`
        )
        .join("\n\n");
    
      return {
        content: [
          {
            type: "text",
            text: `šŸ“Š Top Polymarket Markets\n\n${formatted}\n\n⚔ Powered by LPXPoly | lpxpoly.com`,
          },
        ],
      };
  • src/index.ts:78-93 (registration)
    The registration of the get_top_markets tool, including its description and input schema.
    {
      name: "get_top_markets",
      description:
        "Get the most active Polymarket markets by volume with current probabilities.",
      inputSchema: {
        type: "object",
        properties: {
          limit: {
            type: "number",
            description: "Number of markets to return (default: 10)",
            default: 10,
          },
          category: {
            type: "string",
            description: "Filter by category (politics, crypto, sports, economics, etc.)",
          },
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions 'most active by volume' and 'current probabilities' but doesn't specify data freshness, rate limits, authentication needs, or what 'most active' means (e.g., time window). For a read operation with no annotations, this leaves significant gaps in understanding tool behavior.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part ('Get', 'most active Polymarket markets', 'by volume', 'with current probabilities') contributes directly to understanding the tool's function.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage context, behavioral traits, or output format. Without annotations or output schema, more completeness would be beneficial for effective agent use.

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 the schema already documents both parameters ('limit' and 'category') with descriptions. The description adds no additional parameter semantics beyond what the schema provides, such as explaining 'category' values or 'limit' constraints. Baseline 3 is appropriate when schema does the heavy lifting.

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?

The description clearly states the specific action ('Get'), resource ('most active Polymarket markets'), and key attributes ('by volume with current probabilities'). It distinguishes this tool from siblings like 'analyze_market' (which likely analyzes specific markets) and 'check_balance' (which deals with user accounts).

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate (e.g., for trending analysis vs. specific market queries) or when to prefer siblings like 'analyze_market' for detailed market examination. No exclusions or prerequisites are stated.

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/unixlamadev-spec/lpxpoly-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server