Skip to main content
Glama
dylancharris

ESPN Fantasy Basketball MCP Server

by dylancharris

get_league_teams

Retrieve the full list of teams in an ESPN Fantasy Basketball league, with team details like IDs, names, locations, and records. Requires a league ID and season year.

Instructions

Get all teams in 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)
    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 team dictionaries with id, name, location, record, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
swidNo
yearNo
espn_s2No
league_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the transparency burden. It explains env var fallbacks, optional authentication cookies for private leagues, and the return shape. However, it does not disclose potential errors or network behavior, but for a read operation this is adequate.

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 docstring is compact and structured with Args/Returns sections. Every sentence provides necessary information without redundancy.

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?

The description covers the tool's purpose, all parameters, auth for private leagues, and return data. It lacks error handling details but is complete for a simple read-all operation.

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 coverage is 0%, so the description must explain all parameters. It does: league_id, year, espn_s2, swid, each with purpose, optionality, and env var defaults. This adds significant value beyond the schema's bare type definitions.

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 all teams in an ESPN Fantasy Basketball league,' which clearly identifies the action and resource. This distinguishes it from siblings like get_team_roster (single team) and get_free_agents (different entity type).

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

Usage Guidelines3/5

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

The description implies use when needing all teams in a league but does not explicitly contrast with alternatives or state exclusions. It provides context on optional parameters and authentication but lacks clear 'use this instead of X' guidance.

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