Skip to main content
Glama
tlo1216

espn-fantasy-mcp

by tlo1216

Optimal Lineup Suggestion

optimal_lineup
Read-onlyIdempotent

Suggests a starting lineup by filling the most restrictive slots first, then assigning the best remaining projection for each slot, ranked by season or a given scoring period. Returns a suggestion to review and apply.

Instructions

Suggests a starting lineup for one team: fills the most restrictive slots first (fewest eligible roster players), then the best remaining projection for each slot — the same approach the cheat sheets describe by hand. A heuristic, not a guaranteed-optimal assignment. Ranks by season projection by default, or by a specific scoring period's projection if scoring_period_id is given (a bye-week/no-game player ranks 0 for that period, not by season total). Locked players keep their current slot. This is a suggestion only — pass the resulting moves to set_lineup yourself if you want to apply them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sportNoffl (football), fba (basketball), or flb (baseball). Defaults to ESPN_SPORT.ffl
seasonNoSeason year. Defaults to ESPN_SEASON.
team_idNo
league_idNoESPN league id. Defaults to ESPN_LEAGUE_ID.123456
scoring_period_idNoRank by this period's projection instead of season total.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
benchYes
startersYes
usingPeriodProjectionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the near term read-only/idempotent/destructive annotations, it adds critical behavioral detail: this is a heuristic, not guaranteed optimal; bye-week/no-game players rank 0 for a given scoring period; locked players keep their slot; and it is a suggestion that does not modify. This is rich context that a caller must know to trust the output.

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 a single dense run-on-style paragraph that front-loads the mechanism, then gives heuristics and cautions. It is not overly bloated—each sentence carries a distinct fact (algorithm, non-optimality, ranking period, locked players, apply-offloading). A tiny bit more line break would improve scannability, but it's far from verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With output schema present and safety annotations already in place, the description fills all functional gaps: what it suggests, how it picks slots, what numbers it uses (season vs scoring period), how locked players behave, and how to apply the result. No missing information that would prevent a correct invocation.

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 schema already documents sport, league, etc. The description adds meaningful behavior for scoring_period_id (ranks by that period, modifies bye-week behavior) and overall ties the heuristic to 'best projection'. It doesn't explain team_id's enumeration but the default of 1 and the 'one team' wording make it adequate; the description adds value beyond the 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 a specific verb ("suggests") and a specific resource ("a starting lineup for one team"), and it goes further by contrasting its purpose with set_lineup ("pass the resulting moves to set_lineup yourself"). This clearly differentiates it from siblings like get_rosters and set_lineup.

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 explicitly says the tool is a non-committal suggestion and that the caller should invoke set_lineup to apply the moves. It also tells the agent when to add scoring_period_id (when ranking by a specific period) and clarifies the two different projection modes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.