Skip to main content
Glama
proplineapi

PropLine

Official

propline_list_events

Retrieve upcoming sports events with IDs, teams, and start times. Use event IDs to access odds, props, and results.

Instructions

List upcoming events for a sport. Returns each event's id, home_team, away_team, commence_time. Use the returned event_id to drill into per-event odds, props, +EV, or results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sport_keyYesSport key from propline_list_sports — e.g. baseball_mlb, basketball_nba
liveNoIf true, only return in-progress (live) events. Defaults to false.

Implementation Reference

  • src/index.ts:82-109 (registration)
    Tool registration for 'propline_list_events' within the tools array, including name, description, input schema, and handler that delegates to client().listEvents().
    {
      name: "propline_list_events",
      description:
        "List upcoming events for a sport. Returns each event's id, " +
        "home_team, away_team, commence_time. Use the returned event_id " +
        "to drill into per-event odds, props, +EV, or results.",
      inputSchema: {
        type: "object",
        properties: {
          sport_key: {
            type: "string",
            description:
              "Sport key from propline_list_sports — e.g. baseball_mlb, basketball_nba",
          },
          live: {
            type: "boolean",
            description:
              "If true, only return in-progress (live) events. Defaults to false.",
          },
        },
        required: ["sport_key"],
        additionalProperties: false,
      },
      handler: (args) =>
        client().listEvents(args.sport_key as string, {
          live: args.live as boolean | undefined,
        }),
    },
  • Inline handler for propline_list_events — extracts sport_key and optional live flag and calls client().listEvents().
    handler: (args) =>
      client().listEvents(args.sport_key as string, {
        live: args.live as boolean | undefined,
      }),
  • Input schema: requires sport_key (string), optional live (boolean), no additional properties.
    inputSchema: {
      type: "object",
      properties: {
        sport_key: {
          type: "string",
          description:
            "Sport key from propline_list_sports — e.g. baseball_mlb, basketball_nba",
        },
        live: {
          type: "boolean",
          description:
            "If true, only return in-progress (live) events. Defaults to false.",
        },
      },
      required: ["sport_key"],
      additionalProperties: false,
    },
  • PropLineClient.listEvents() — the actual API call that GETs /v1/sports/{sportKey}/events with an optional ?live=true query parameter.
    listEvents(sportKey: string, opts: { live?: boolean } = {}): Promise<unknown> {
      return this.request(`/v1/sports/${sportKey}/events`, {
        live: opts.live ? "true" : undefined,
      });
    }
  • The private request() method that all client calls (including listEvents) use — constructs URL with query params, sends fetch with API key, parses response.
    private async request<T = unknown>(
      path: string,
      query: Record<string, string | number | boolean | undefined> = {},
    ): Promise<T> {
      const url = new URL(this.baseUrl + path);
      for (const [k, v] of Object.entries(query)) {
        if (v !== undefined && v !== null && v !== "") {
          url.searchParams.set(k, String(v));
        }
      }
    
      const controller = new AbortController();
      const timer = setTimeout(() => controller.abort(), this.timeoutMs);
      try {
        const r = await fetch(url, {
          headers: {
            "X-API-Key": this.apiKey,
            Accept: "application/json",
            "User-Agent": "propline-mcp/0.1.0",
          },
          signal: controller.signal,
        });
        const text = await r.text();
        if (!r.ok) {
          throw new PropLineHTTPError(r.status, text);
        }
        try {
          return JSON.parse(text) as T;
        } catch {
          return text as unknown as T;
        }
      } finally {
        clearTimeout(timer);
      }
    }
Behavior4/5

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

With no annotations, description discloses that it returns event IDs and team names, and behavior of 'live' parameter is implied. Does not mention read-only nature or potential errors, but adequate for a list tool.

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 sentences, no fluff, front-loaded with purpose and return fields, then usage hint.

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?

Completeness is good for a simple list tool: explains inputs, outputs, and next steps. Missing details like ordering or pagination, but not critical.

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 covers sport_key and live with 100% description coverage; description only reiterates return fields, adding no extra parameter insight.

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?

Description clearly states it lists upcoming events for a sport and specifies return fields (id, home_team, away_team, commence_time). It distinguishes from siblings like propline_get_odds or propline_get_event_results by focusing on event listing.

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

Usage Guidelines4/5

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

Description implicitly guides usage by noting to use event_id for per-event details, but lacks explicit when-to-use vs alternatives or when-not-to-use.

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/proplineapi/propline-mcp'

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