Skip to main content
Glama

MLB DraftKings lineup optimizer

invoke_mlb_optimizer
Read-onlyIdempotent

Builds DraftKings MLB classic lineups under the $50,000 cap from the BankrollSZN pool: 2 P, C, 1B, 2B, 3B, SS, 3 OF. contest_type loads the BankrollSZN preset (20max, 150max, 3max, single) and the preset's own lineup count: up to 20 for 20max and 150 for 150max. Stacks a primary and a secondary team, limits hitters against its own pitchers, and supports locks, excludes, an ownership cap, exposure caps per player, a stack plan per team and unique lineups. Every lineup has dk_upload (DK ids in slot order) and the result has csv: a DraftKings upload file in the site export format (P,P,C,1B,2B,3B,SS,OF,OF,OF, one "Name (DK id)" cell per slot). A big portfolio is built over several calls: when the result has next_call, call again with its prior_lineups and total_lineups until remaining is 0, then use the last csv. Postponed games are removed. Classic only. For Showdown use mlb_showdown_optimizer.

Input Schema

NameRequiredDescriptionDefault
lockNoPlayer names that must be in every lineup.
modeNoDefault gpp.
stackNoStack shape, primary-secondary. For example 4-2 (default), 4-3, 5-2, 5-3, 3-3, or 5.
excludeNoPlayer names to leave out.
lineupsNoNumber of new lineups. Up to the preset count: 20 for 20max, 150 for 150max, 3 for 3max, 5 for single. The free plan gets 1.
slate_idNoSlate ID from mlb_list_slates. Defaults to the main slate.
team_capsNoMost lineups with a team as the primary stack, for example {"LAD": 6}. Below 1 is a share of the lineups.
min_salaryNoMinimum total salary.
min_uniqueNoPlayers each lineup must differ from the ones before it. Default 3.
own_lambdaNoOverride the gpp ownership penalty. Default comes from contest_type.
stack_planNoPrimary stack team per lineup as counts, for example {"LAD": 6, "TB": 6, "MIL": 5}. The lineups are interleaved across the run.
stack_teamsNoTeams allowed as the primary stack. Default: the top 6 teams by TeamROO score.
contest_typeNoDraftKings contest type. 20max is the base projection.
exposure_capsNoMost lineups for a player, for example {"Drew Rasmussen": 0.55, "Robbie Ray": 3}. Below 1 is a share of the lineups, 1 or more is a lineup count. Replaces the preset cap for that player.
max_total_ownNoCap on the summed ownership of the 10 players, in percent.
prior_lineupsNodk_upload strings of lineups already built in this portfolio (from next_call). They count toward exposure, caps and uniqueness and are not built again.
total_lineupsNoThe portfolio size the caps are computed on, from next_call.
confirmed_onlyNoOnly use players in confirmed lineups.
secondary_teamsNoTeams allowed as the secondary stack.
pitcher_own_lineNoOwnership line for pitchers, in percent, used with max_pitchers_over_line. Example 40.
max_batting_orderNoStack hitters must bat at or above this spot. Default 9.
max_low_owned_hittersNoMost hitters under 3 percent ownership in a lineup. Default from the preset.
max_hitters_vs_pitcherNoMost hitters allowed against your own pitchers. Default 1.
max_pitchers_over_lineNoMost pitchers above pitcher_own_line in one lineup. Example 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, yet the description adds substantial behavior: contest_type loads preset lineup counts (20 for 20max, 150 for 150max), stacks limit hitters against own pitchers, postponed games are removed, and the result carries dk_upload plus a csv in DK's export format. Nothing here contradicts the annotations.

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?

Front-loaded with purpose then constraints, and essentially every sentence earns its place (roster shape, preset counts, stacking rules, continuation protocol, export format). It is dense run-on prose rather than cleanly segmented, which slightly hurts scanability but wastes no words.

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 24 parameters and no output schema, the description carries the return-value burden and does: it documents dk_upload, the csv slot order and cell format, and the next_call/remaining pagination fields. For a 24-param optimizer with two enums and nested objects, an agent has everything needed to call and iterate 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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning on top: preset-driven lineup counts per contest_type, the 4-2 default stack shape with the primary/secondary concept, and the prior_lineups/total_lineups continuation semantics that the schema only names. A few numeric parameters (min_salary, own_lambda) are left entirely to 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?

States a specific verb and resource ("Builds DraftKings MLB classic lineups") and immediately fixes the scope: $50,000 cap, BankrollSZN pool, and the exact roster shape (2 P, C, 1B, 2B, 3B, SS, 3 OF). It explicitly differentiates from the closest sibling: "Classic only. For Showdown use mlb_showdown_optimizer."

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?

Names the alternative tool and the condition that selects it (Showdown), and gives an explicit orchestration protocol for large portfolios: when the result has next_call, call again with prior_lineups and total_lineups until remaining is 0, then use the last csv. That is when-to-use guidance the agent cannot infer from the schema.

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