Skip to main content
Glama
dylancharris

ESPN Fantasy Basketball MCP Server

by dylancharris

get_player_stats

Retrieve comprehensive fantasy basketball stats for a player over season, projections, or last 7/30 days. Provide player ID and optional league/year to access all categories.

Instructions

Get comprehensive player statistics for specified timeframe.

Args:
    player_id: ESPN player ID
    league_id: ESPN Fantasy Basketball league ID (optional, uses ESPN_LEAGUE_ID env var)
    year: Season year (e.g., 2025) (optional, uses ESPN_YEAR env var or defaults to 2025)
    timeframe: Time period - "season", "projections", "last_7", "last_30"
    espn_s2: ESPN authentication cookie for private leagues (optional, uses ESPN_S2 env var)
    swid: ESPN SWID cookie for private leagues (optional, uses ESPN_SWID env var)

Returns:
    Dictionary with comprehensive player statistics across all categories

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
swidNo
yearNo
espn_s2No
league_idNo
player_idYes
timeframeNoseason
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It responsibly documents authentication requirements for private leagues (espn_s2, swid), environment variable fallbacks, and default year behavior, which are meaningful traits. However, it does not disclose error handling or what happens if a player lookup fails, and the Returns line is generic.

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?

The description is concise and well-structured: a one-line summary, followed by a compact Args list, and a brief Returns line. Every sentence serves a purpose, and the format is easy to scan for an AI agent.

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?

Given the tool's moderate complexity (6 params, no output schema, no annotations), the description covers all parameters and provides a high-level return type. However, the Returns description 'Dictionary with comprehensive player statistics across all categories' is vague about the actual structure, and there is no mention of potential errors or edge cases. This prevents a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides zero description coverage, but the description's Args section fully explains every parameter, including optionality, defaults, and possible values (e.g., timeframe enumerates 'season', 'projections', 'last_7', 'last_30'). This adds substantial meaning beyond the bare schema field names and compensates for the 0% schema coverage.

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?

The opening sentence 'Get comprehensive player statistics for specified timeframe' clearly states a specific action (get) and resource (player statistics) with a defined scope (timeframe). This distinguishes the tool from siblings like get_team_roster or get_nba_schedule, which serve different purposes.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It simply lists parameters without explaining typical use cases, prerequisites, or scenarios where another tool would be more appropriate. Sibling tools like compare_players or get_trending_players are not mentioned in any cross-referencing way.

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/dylancharris/espn-fantasy-basketball-mcp'

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