Skip to main content
Glama

DFS Lineup Optimizer

Build DFS lineups

build_lineups
Read-only

Build up to 20 lineups for a Classic contest. Pass example (a sample slate) or players (the site's salary CSV text, or a list of player objects for DraftKings). Returns each lineup with its players, slots, salary and projected points, player exposure, notes about what defaults were applied, and upload_csv: a DraftKings/FanDuel/Yahoo upload-ready CSV string. Takes 2-60 s; if the result has status 'running', call get_lineup_result with the job_id. Lineups are optimal for the PROJECTIONS used, not predictions of results.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sport": "<sport>"
    },
    "name": "build_lineups"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoContest site (default dk). 'players' as a list works for dk only; fd and yahoo need the site's raw CSV text.
rulesNoSport-specific rules, using the web app's option names. Each is tagged with the sports it applies to; a rule for another sport is an error. get_lineup_example(sport) lists the ones for that sport.
sportYes
exampleNoUse a bundled sample slate instead of players (names from list_lineup_examples, or just the sport). Live lookups are skipped.
playersNoEITHER the raw salary CSV text exactly as exported from the contest site (DraftKings 'Download players' / FanDuel players list / Yahoo export; a Classic contest), OR a list of player objects (site dk only).
n_lineupsNoLineups to build (default 10, max 20: diversity cuts make each extra lineup slower and the free server is small).
min_salaryNoLineups must spend at least this much.
projectionsNoYour own projections as {player name or id: points}; overrides the file's AvgPointsPerGame for those players. Names are matched case-insensitively.
live_lookupsNoNHL line combos / starting goalies and MLB batting orders / probable pitchers from the public sites the web page uses (default false: skipped; sample slates always skip). Can fail or be slow; a failure is reported, the solve still runs.
lock_playersNoPlayers (name or id) that must be in every lineup.
wait_secondsNoHow long to wait inside this call (default 25).
exclude_playersNoPlayers (name or id) to leave out.
max_exposure_pctNoAny one player may appear in at most this % of the lineups (100 = no cap).
exclude_out_playersNoDrop players the file marks OUT/IL (default true, as the web page does).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/destructiveHint=false, but the description adds genuinely useful behavior beyond them: a 2-60 s runtime range, the 'running' status handoff, disclosure that defaults are reported back as notes, and the important caveat that lineups are optimal for the PROJECTIONS used rather than predictions. Minor tension with openWorldHint=false given optional live_lookups fetches public sites, though it is off by default so this is not a contradiction.

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?

One dense paragraph that is well front-loaded: purpose, then inputs, then return value, then timing/async, then the modeling caveat. Every sentence carries information, though the input-alternative sentence is somewhat long.

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?

For a 14-parameter tool with a large nested rules object, the description covers return contents, runtime, async continuation, and the projection-vs-prediction caveat; rule enumeration is delegated to get_lineup_example in the schema. The remaining gap is that per-sport rule applicability and error behavior are only documented in the schema, not the description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 93%, so the schema already carries parameter meaning; the description mainly restates the `example` vs `players` choice, which the schema documents in detail. It adds no extra syntax or constraints for the 45+ nested `rules` options.

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 with scope ('Build up to 20 lineups for a Classic contest') and enumerates the output shape (players, slots, salary, projected points, exposure, upload_csv). An agent can distinguish it from get_lineup_result, which is explicitly named as the polling follow-up.

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

Usage Guidelines4/5

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

Gives the either/or input path (use `example` for a sample slate vs `players` for real salary data) and the asynchronous branch: if status is 'running', call get_lineup_result with the job_id. It does not explicitly state exclusions or when to prefer list_lineup_examples/get_lineup_example, so it stops short of full routing guidance.

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