Skip to main content
Glama

List a User's Fantasy Leagues

fantasy_list_user_leagues
Read-onlyIdempotent

Discover the leagues an account belongs to on a provider — mainly for discovery WITHOUT a connected profile (a connected profile's leagues come back directly).

Credentials per provider: Sleeper username + season; ESPN espn_s2 + swid + season + sport; Fantrax secret_id — Fantrax discovery often returns empty even when leagues exist, so on empty ask for a league URL/id and use the league tools directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sportNoSport, e.g. 'NFL', 'NBA', 'MLB', 'NHL'. Required for ESPN/Sleeper and Fantrax name lookups.
seasonNoSeason year, e.g. 2025. Required for ESPN/Sleeper league discovery; ignored by Fantrax.
providerNoFantasy platform. Optional: defaults to your connected platform ('sleeper').
credentialsNoPer-call credentials, only needed WITHOUT a connected profile. Keys: secret_id (Fantrax); espn_s2 + swid (private ESPN leagues); username or user_id (Sleeper discovery); session_cookie / auth_token + write_enabled:true (explicit write opt-in only). Public ESPN leagues and all Sleeper reads need none.
response_formatNo'markdown' (default) or 'json' (raw payload).markdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / credentials / additionalProperties
      Previous value: -falseNew value: +true
    • changedInput schema / properties / credentials / description
      Previous value: -"Per-call credentials. Fill only the keys your provider needs (see fantasy_list_providers). Public ESPN leagues and all Sleeper reads need none."New value: +"Per-call credentials, only needed WITHOUT a connected profile. Keys: secret_id (Fantrax); espn_s2 + swid (private ESPN leagues); username or user_id (Sleeper discovery); session_cookie / auth_token + write_enabled:true (explicit write opt-in only). Public ESPN leagues and all Sleeper reads need none."
    • removedInput schema / properties / credentials / properties / espn_s2
      Removed value: -{
      -  "description": "ESPN private-league cookie 'espn_s2' (DevTools → Application → Cookies → espn.com).",
      -  "type": "string"
      -}
    • removedInput schema / properties / credentials / properties / secret_id
      Removed value: -{
      -  "description": "Fantrax Secret ID (User Profile → 'Your Secret ID').",
      -  "type": "string"
      -}
    • removedInput schema / properties / credentials / properties / swid
      Removed value: -{
      -  "description": "ESPN private-league cookie 'SWID': a GUID in curly braces, e.g. {XXXX-...}.",
      -  "type": "string"
      -}
    • removedInput schema / properties / credentials / properties / user_id
      Removed value: -{
      -  "description": "Sleeper numeric user_id (alternative to username).",
      -  "type": "string"
      -}
    • removedInput schema / properties / credentials / properties / username
      Removed value: -{
      -  "description": "Sleeper username (for league discovery).",
      -  "type": "string"
      -}
    • changedInput schema / properties / provider / description
      Previous value: -"Fantasy platform: 'fantrax', 'espn', or 'sleeper'. Call fantasy_list_providers first to see each provider's capabilities and required credentials."New value: +"Fantasy platform. Optional: defaults to your connected platform ('sleeper')."
    • changedInput schema / properties / response_format / description
      Previous value: -"Output format: 'markdown' (default, human-readable) or 'json' (raw upstream payload)."New value: +"'markdown' (default) or 'json' (raw payload)."
    • changedInput schema / properties / season / description
      Previous value: -"Season year, e.g. 2024. REQUIRED for espn and sleeper league discovery; ignored by fantrax."New value: +"Season year, e.g. 2025. Required for ESPN/Sleeper league discovery; ignored by Fantrax."
    • changedInput schema / properties / sport / description
      Previous value: -"Sport, e.g. 'NFL', 'NBA', 'MLB', 'NHL'. Required for ESPN/Sleeper and for Fantrax player/name lookups."New value: +"Sport, e.g. 'NFL', 'NBA', 'MLB', 'NHL'. Required for ESPN/Sleeper and Fantrax name lookups."
    • removedInput schema / required
      Removed value: -[
      -  "provider"
      -]
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses useful behavioral details: per-provider credential requirements, the fact that Fantrax discovery often returns empty even when leagues exist, and the recommended fallback path. This helps the agent anticipate and handle failures rather than assuming a successful result.

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 three sentences with no wasted words. The core purpose is front-loaded, the credential requirements are grouped efficiently, and the Fantrax caveat is included in a compact final sentence.

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 is sufficiently complete for a read-only discovery tool: it covers provider differences, credential needs, fallback behavior, and the connected-profile distinction. It does not describe the exact output shape, but the response_format parameter and the phrase 'Discover the leagues' give enough context for an agent to proceed correctly.

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?

The input schema already covers 100% of parameter descriptions, so the baseline is 3. The description adds meaningful value by compactly listing the exact credentials needed per provider ('Sleeper username + season; ESPN espn_s2 + swid + season + sport; Fantrax secret_id'), which complements the schema's broader credential description.

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 a specific verb and object: 'Discover the leagues an account belongs to on a provider.' It also clearly scopes the tool to discovery without a connected profile, which differentiates it from sibling tools that fetch league details, rosters, or matchups.

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

Usage Guidelines5/5

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

It states when this tool is appropriate ('mainly for discovery WITHOUT a connected profile'), when it is not needed ('a connected profile's leagues come back directly'), and provides provider-specific fallback guidance ('on empty ask for a league URL/id and use the league tools directly'). This gives an agent actionable selection criteria.

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.

Resources