Skip to main content
Glama

stat-api — Sports Data

Query table

query_table
Read-onlyIdempotent

Query any table. Returns {"<table>": [rows], "limit": N, "next_from_id": M|null, "has_more": bool}. To read every row, start with from_id=0 and re-call with from_id set to the previous next_from_id until it is null. A call without from_id returns the first page in the table's default sort with next_from_id null. filters is a flat object of field or field__op keys from describe_table (e.g. {"season_id": 2024, "day__between": "20250101,20250131"}). Requires a stat-api account: sign in when the app asks (free account at https://stat-api.com), or send an API key as Authorization: Bearer . Every returned row counts against the monthly record quota.

Input Schema

NameRequiredDescriptionDefault
limitNo
tableYes
leagueYes
filtersNofield or field__op keys → scalar values; see describe_table
from_idNokeyset cursor: 0 for the first page of a full walk, then the previous next_from_id

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / league / enum
      Previous value: -[
      -  "nfl",
      -  "nba",
      -  "mlb",
      -  "nhl",
      -  "pga",
      -  "dfs",
      -  "kalshi",
      -  "polymarket",
      -  "reference"
      -]New value: +[
      +  "nfl",
      +  "nba",
      +  "mlb",
      +  "nhl",
      +  "pga",
      +  "dfs",
      +  "reference"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / from_id / description
      Previous value: -"keyset cursor from next_from_id"New value: +"keyset cursor: 0 for the first page of a full walk, then the previous next_from_id"
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds material context beyond them: auth requirement (stat-api account or Authorization: Bearer key), quota cost per returned row, the exact response envelope, and pagination termination semantics. This is behavior an agent cannot infer from the annotations.

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?

Dense but front-loaded: the return shape and pagination walk come first, then filter syntax, then auth and quota. Every sentence is load-bearing, though the auth/quota sentence is tightly packed and the filter example could be a separate clause for readability.

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?

No output schema exists, so the description must describe returns itself, and it does precisely (table rows, limit, next_from_id, has_more). Auth, quota, pagination termination, and filter construction are all covered for a 5-parameter tool with nested-object filters.

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?

With only 40% schema coverage the description carries most of the burden and largely succeeds: it explains from_id as a keyset cursor with the 0-start convention, defines filters as a flat object of `field` or `field__op` keys, and shows a worked example including `day__between`. league and table values remain unexplained, though their enum and naming make them low-risk.

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?

States a specific verb and resource ('Query any table') and names the sibling table used to build filters (describe_table). It stops short of distinguishing itself from graphql_query, the other general query tool in the sibling list, so an agent still has to guess between the two.

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?

Gives concrete operational guidance: how to walk every row (from_id=0, follow next_from_id until null), what happens when from_id is omitted, and that filters keys come from describe_table. There is no explicit when-to-use/when-not rule relative to graphql_query or get_record, so it falls short of the top band.

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.