Skip to main content
Glama

Polymarket Arbitrage Statistics

pm_arb_stats

Get free statistics on Polymarket arbitrage: total opportunities, average spread, markets analyzed, and last update timestamp.

Instructions

Get statistics about the Polymarket arbitrage dataset: total opportunities tracked, average spread, markets analyzed, and last updated. Free endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the pm_arb_stats tool. It calls apiGet to fetch /api/v1/pm/arb/stats and returns the JSON response.
    server.registerTool(
      "pm_arb_stats",
      {
        title: "Polymarket Arbitrage Statistics",
        description:
          "Get statistics about the Polymarket arbitrage dataset: total opportunities tracked, " +
          "average spread, markets analyzed, and last updated. Free endpoint.",
        inputSchema: {},
      },
      async () => {
        const res = await apiGet<PmArbStatsResponse>("/api/v1/pm/arb/stats");
    
        if (!res.ok) {
          return {
            content: [
              {
                type: "text" as const,
                text: `API error (${res.status}): ${JSON.stringify(res.data)}`,
              },
            ],
            isError: true,
          };
        }
    
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(res.data, null, 2) },
          ],
        };
      },
    );
  • TypeScript interface defining the shape of the stats API response (dataset, source, update_frequency, stats).
    interface PmArbStatsResponse {
      dataset: string;
      source: string;
      update_frequency: string;
      stats: Record<string, unknown>;
    }
  • src/index.ts:55-58 (registration)
    Registration of the pmArbTools function in the main MCP server setup, which includes the pm_arb_stats tool.
    registerPmArbTools(server);
    registerPmResolutionTools(server);
    registerEconTools(server);
    registerPmMicroTools(server);
  • The apiGet helper used by the handler to make HTTP GET requests to the Verilex API.
    export async function apiGet<T = unknown>(
      path: string,
      params?: Record<string, string | number | undefined>,
    ): Promise<ApiResponse<T>> {
      const url = buildUrl(path, params);
    
      const headers: Record<string, string> = {
        Accept: "application/json",
        "User-Agent": "verilex-mcp-server/0.1.0",
      };
    
      // Forward x402 payment token if present in env (for paid endpoints)
      const paymentToken = process.env.VERILEX_PAYMENT_TOKEN;
      if (paymentToken) {
        headers["X-Payment-Token"] = paymentToken;
      }
    
      const res = await fetch(url, { headers });
      const data = (await res.json()) as T;
    
      const stale = res.headers.get("X-Data-Stale");
      const lastUpdated = res.headers.get("X-Data-Last-Updated");
      const ageSeconds = res.headers.get("X-Data-Age-Seconds");
    
      return {
        ok: res.ok,
        status: res.status,
        data,
        stale: stale === "true",
        lastUpdated: lastUpdated ?? undefined,
        ageSeconds: ageSeconds ? Number(ageSeconds) : undefined,
      };
    }
Behavior2/5

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

Description does not disclose behavioral traits beyond listing output fields. With no annotations, the full burden falls on the description, which lacks details on rate limits, data freshness, error responses, or performance considerations.

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?

Two concise sentences with no redundant information. Every word contributes value: 'statistics about the Polymarket arbitrage dataset' followed by a scoped list of outputs and a note on cost.

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

Completeness4/5

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

Given no input parameters and no output schema, the description names the output fields (total opportunities, etc.), which is mostly sufficient. However, it could mention the response format or update frequency for a stats endpoint, though 'last updated' covers staleness.

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

Parameters4/5

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

Input schema has zero parameters (100% coverage), so the description does not need to add parameter details. The baseline for 0 parameters is 4, and the description correctly omits param info.

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 tool retrieves aggregate statistics for the Polymarket arbitrage dataset, listing specific data points (total opportunities, average spread, markets analyzed, last updated). This distinguishes it from siblings like pm_arb_opportunities (likely listing individual opportunities) and pm_arb_changes (tracking changes).

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 guidance on when to use this tool versus alternatives. Among many sibling tools (e.g., pm_stats, pm_arb_changes), there is no contextual hint for selecting this specific endpoint. The description only notes it's a 'free endpoint', which is insufficient context.

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/carrierone/verilexdata-mcp'

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