Skip to main content
Glama

FastballAPI

Plate appearances

get_plate_appearances
Read-onlyIdempotent

Use for plate-appearance play-by-play: a whole game in order, or a batter's, pitcher's or team's season, with the base-out state before, the result, the batted ball (trajectory and location), runs, the home win probability after (our model, every plate appearance since 2015) and our run value (RE24). Filter by result, inning or runners in scoring position. Costs 10 credits.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_plate_appearances"
  }
}

Input Schema

NameRequiredDescriptionDefault
rispNoRunners in scoring position only.
teamNoBatting team (id or abbreviation).
limitNoMax rows (default 200).
inningNo
leagueNoLeague. Defaults to mlb. One of: mlb, ncaabase.
offsetNo
resultNoe.g. home-run, strikeout, walk, single, double, ground-out.
seasonNoSeason (a year; default: the latest; ignored with game_id).
game_idNo
batter_idNo
pitcher_idNo
season_typeNo

Output Schema

NameRequiredDescriptionDefault
countYes
next_offsetNo
plate_appearancesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so safety is covered; the description instead adds non-obvious behavior: a 10-credit cost, the fact that win probability comes from a proprietary model covering every plate appearance since 2015, and that run value is RE24-based. That provenance and pricing context is genuinely beyond what annotations provide, though default row counts and pagination behavior go unmentioned.

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 use case, then filters, then cost, with no filler. The opening sentence is long and comma-chained across output fields, but every clause conveys a distinct data attribute rather than restating the name.

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 not be explained, and the description still covers scope, filtering, cost and data vintage. For a 12-parameter tool the only shortfall is silence on pagination defaults and on how league/season_type interact with the other selectors.

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 50% schema coverage across 12 parameters, the description carries real weight: it clarifies that result/inning/risp are filters, that batter_id/pitcher_id/team_id govern the season-level views, and that season defaults to latest. It leaves league, season_type, limit and offset entirely to the schema, which is a modest remaining gap.

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?

States a specific resource (plate-appearance play-by-play) with three scopes (whole game, batter/pitcher/team season) and enumerates what each row contains (base-out state, result, batted ball trajectory/location, runs, win probability, RE24). This cleanly separates it from pitch-level siblings like get_pitches and from aggregate tools like get_leaders.

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?

'Use for plate-appearance play-by-play' plus the enumerated scopes tells an agent exactly which queries belong here, and the listed filters imply how to narrow. It stops short of naming an alternative or a when-not-to-use condition, so it is clear context without explicit routing.

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.