Skip to main content
Glama
dylancharris

ESPN Fantasy Basketball MCP Server

by dylancharris

get_matchups

Fetch ESPN Fantasy Basketball matchups and scores for any league, season, and scoring period, with home and away teams listed.

Instructions

Get matchups/schedule for an ESPN Fantasy Basketball league.

Args:
    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)
    scoring_period: Specific scoring period to get matchups for (optional)
    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:
    List of matchup dictionaries with home/away teams and scores

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
swidNo
yearNo
espn_s2No
league_idNo
scoring_periodNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It explains authentication requirements (espn_s2, swid) for private leagues, environment variable fallbacks, and the return format (list of matchup dictionaries). It does not mention error handling or rate limits, but for a read-only retrieval tool this is fairly transparent.

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 well-structured with a one-sentence purpose followed by a clean Args block and Returns line. Every line earns its place; there is no redundant text or fluff.

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 moderate complexity (5 params) and an existing output schema, the description covers parameter semantics and return shape. It lacks explicit differentiation from sibling schedule tools, but overall provides sufficient context for an agent to invoke it correctly.

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?

Schema description coverage is 0%, so the description fully compensates by explaining every parameter: league_id and year fall back to env vars/defaults, scoring_period selects a specific period, and espn_s2/swid authenticate private leagues. This adds significant meaning beyond the bare schema.

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 description opens with 'Get matchups/schedule for an ESPN Fantasy Basketball league,' using a specific verb and resource. This clearly distinguishes it from siblings like get_nba_schedule by specifying 'Fantasy Basketball league' matchups.

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?

The description implies usage for retrieving league matchups or schedules, and documents optional parameters including auth for private leagues. It does not explicitly state when to prefer this over siblings like get_nba_schedule or get_league_teams, but the context is clear enough for correct selection.

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