Skip to main content
Glama
MLB Stats MCP

MLB Stats MCP

by prnv-13

get_player_game_log

Read-onlyIdempotent

Retrieve a player's game-by-game hitting or pitching stats, most recent first, to assess recent form, streaks, and last night's or this week's performance.

Instructions

Get a player's game-by-game stats, most recent game first. Use for recent form, hot or cold streaks, and "how did he do last night / this week" questions.

Args:
    player_id: MLB player id from search_players.
    group: "hitting" or "pitching".
    season: Season year; defaults to the current one.
    last_n: Number of most recent games to return (1-162).

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": {
      "player_id": "<player_id>"
    },
    "name": "get_player_game_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNohitting
last_nNo
seasonNo
player_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and openWorld, so safety is covered. The description adds genuinely behavioral detail beyond that: results are ordered most-recent-first and last_n bounds the window. Authentication and rate-limit behavior are not mentioned, but they are not needed to call it correctly.

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?

Front-loaded with the action and ordering, followed by tight usage triggers and a compact Args block. The Args docstring style is slightly verbose but every line maps to a real parameter.

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?

An output schema exists, so return values need no explanation, and the description covers all four input parameters plus ordering semantics. It could add edge-case handling (no games in range, players who have not yet debuted) for full completeness.

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?

Schema coverage is 0%, so the description must carry the parameter burden, and it does: player_id provenance (from search_players), the two allowed group values, the season default, and the last_n range of 1-162. Only minor gaps remain, such as not defining what a 'game' means for a two-way player or how the season default interacts with last_n.

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: 'game-by-game stats, most recent game first.' The 'game-by-game' framing distinguishes it from aggregate siblings like get_player_stats, though that distinction is implied rather than made explicit by naming the alternative.

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 when-to-use triggers: recent form, hot/cold streaks, and 'how did he do last night / this week' questions. It also points to search_players as the source of player_id. It does not state when to use the aggregate stats tool instead, but the usage context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.