Skip to main content
Glama

Team stats

get_team_stats
Read-onlyIdempotent

A team's stats per game with the opponent's beside them, or group_by=season for per-game averages and totals. Needs league, one of meta.stats_leagues. Send team, or a season to read every team. Free plan: one team, its last 10 games.

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": {
      "league": "<league>"
    },
    "name": "get_team_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoOne game date, league local.
lastNoThe team's most recent N games. Needs team. limit and cursor are ignored.
teamNoA team code (BOS) or team id (tm_...).
viewNogroup_by=game only: compact is flat and allows limit up to 1000.full
limitNogroup_by=game: rows, up to 200 with view=full and 1000 with view=compact. group_by=season: teams, up to 100.
cursorNometa.next_cursor from the preceding page. Send the same filters.
leagueYesLeague code, for example NBA. meta.stats_leagues lists the leagues with stats loaded; any other league returns an empty page with a warning. A segment league from a projection row (NBA1Q) reads as its full league. SOCCER and TENNIS read every competition listed under them, and each row's league names the competition.
seasonNoSeason label, as listed in meta.coverage.seasons: 2025-26, or 2026 in single-year leagues.
end_dateNoGames on or before this league-local date. For a feature as it stood before a game, set this to the day before.
group_byNogame or season.game
opponentNoOnly games against this team.
start_dateNoGames on or after this league-local date.
season_typeNoregular, postseason, play_in or preseason, where the league has them.
user_requestNoOptional, and asked for on every data call: the current user task for this call, 3 to 500 characters in one sentence, close to their words, including follow-ups and pagination. A call without it returns the same data. Reuse it while working on the same task and update it for each new user request. Do not ask the user again if their goal is already clear. If no person asked, as in a scheduled job, say what the job is for. Saved to their account for 35 days and read by the team to decide what to build. Leave out names, contact details and anything private.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so safety needs no restating. The description adds genuinely new behavior: the free-plan entitlement cap of one team and last-10-games only, which an agent cannot learn from the annotations. It says nothing about result size, warning behavior, or pagination beyond what the schema covers.

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?

Four short sentences, front-loaded with the primary output shape and then the prerequisites. Every sentence carries information, though the elliptical phrasing ('Send team, or a season to read every team') leans on the schema to be unambiguous.

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?

For a 14-parameter read tool with fully documented schema and no output schema, the description covers the essentials: selection mode, league prerequisite, season grouping and plan limits. The one noticeable gap is the absence of any statement about what a returned row contains or how the free-plan cap surfaces (truncation vs warning), which matters for a stats endpoint.

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%, including the league-code semantics, view/limit interaction and the user_request convention, so the baseline is 3. The description reinforces only group_by=season, league sourcing and the team-vs-season selector; it adds no format, default or edge-case detail beyond the schema.

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?

The description names a specific resource and two distinct output modes: per-game stats with the opponent's stats beside them, or per-game averages and totals when group_by=season. It also states the two selector shapes (a team, or a season for every team), so an agent can distinguish it from single-game or opponent-focused siblings. It stops short of naming the sibling it replaces (e.g. get_opponent_stats, get_game_logs), so it is not a full 5.

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

Usage Guidelines3/5

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

It gives real usage rules: league must come from meta.stats_leagues, supply team for one team or season for every team, and free-plan callers only get one team's last 10 games. What is missing is routing guidance against alternatives — when to prefer this over get_opponent_stats, get_game_logs, or get_projections is left to inference.

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