Skip to main content
Glama
dylancharris

ESPN Fantasy Basketball MCP Server

by dylancharris

get_team_roster

Retrieve a specific team's full roster in an ESPN Fantasy Basketball league, including all players and positions. Supports filters for team, league, season year, and scoring period.

Instructions

Get roster for a specific team in an ESPN Fantasy Basketball league.

Args:
    team_id: Team ID to get roster for (optional, uses ESPN_TEAM_ID env var)
    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 (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:
    Dictionary with team roster including all players and their positions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
swidNo
yearNo
espn_s2No
team_idNo
league_idNo
scoring_periodNo
Behavior3/5

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

With no annotations, the description carries the transparency burden but only partially. It discloses that parameters fall back to environment variables (e.g., ESPN_TEAM_ID), that cookies are needed for private leagues, and that it returns a dictionary with players and positions. However, it does not mention read-only nature explicitly, error cases, or any side effects, missing opportunities for richer behavioral context.

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?

The description is front-loaded with a one-sentence purpose, followed by a structured Args list and a Returns section. It is efficient for a 6-parameter tool, with no fluff. The Args list is necessary given the zero schema coverage, so the length is justified.

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 there is no output schema, the description provides a return type ('Dictionary with team roster including all players and positions'), and covers all parameters. However, it lacks usage context (e.g., when to prefer this over get_available_players) and edge-case behavior, but for a simple roster-fetch tool it is relatively complete.

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 input schema has 0% description coverage, and the description fully compensates by explaining each parameter's meaning, optionality, and env var defaults. For example, team_id is 'Team ID to get roster for', year defaults to 2025 if not provided, and espn_s2/swid are for private league authentication. This adds significant value beyond the raw 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 states 'Get roster for a specific team' with a clear verb and resource, and specifies the domain (ESPN Fantasy Basketball league). This distinguishes it from sibling tools like get_league_teams (lists teams) and get_available_players, as it focuses on a single team's roster.

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?

No explicit guidance on when to use this tool versus alternatives, nor any exclusions or context such as 'use for viewing active players'. The description only restates the purpose and parameter definitions, leaving the agent to infer appropriate usage from the name and siblings.

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