Skip to main content
Glama

generate_lineups

Generate Lineups

Responses:

200: Successful Response (Success Response) Content-Type: application/json

Example Response:

{
  "status": "Status",
  "generated_at": "Generated At",
  "warnings": [],
  "exposures": {},
  "lineups": []
}

422: Validation Error Content-Type: application/json

Example Response:

{
  "detail": [
    {
      "loc": [],
      "msg": "Message",
      "type": "Error Type",
      "ctx": {}
    }
  ]
}

Input Schema

NameRequiredDescriptionDefault
dateYesSlate date YYYY-MM-DD
runsNoAccepted for tier limits and response metadata. Portfolio quality is controlled by preset, candidate_pool_size, pool_oversample_multiplier, and simulation settings.
seedNoRandom seed for reproducibility
locksNoPlayers to lock in
sportNoSport engine to run: nba, mlb or nfl.nba
styleNo
avoidsNoPlayers to avoid
n_simsNoMonte Carlo iterations when simulation is enabled.
presetNoStrategy preset key.gpp_pro_pattern
lineupsNoNumber of lineups (overrides preset default)
platformNoV12 platform profile: fd or dk.fd
sim_modeNoSimulation mode. NBA: mvn/off. MLB: on/off.
slate_idNoSpecific slate ID from /v1/slates. Overrides date-based lookup.
strategyNoGPP or cash game strategy
plan_onlyNoWhen true, the server resolves preset / contest / authoritative slate / top-run-env / locks but does NOT run the optimizer. Returns a Plan response so the user can review and confirm before spending credits on a real generate. Costs 0 credits; normal slate-open safety checks still apply.
contest_idNoOptional contest handle for building an entry-update CSV from the user's existing contest entries.
fd_user_idNoDEPRECATED on /v1/generate: fd_user_id is bound server-side to your API key (see /v1/admin/bind-fd-user). Body value is IGNORED on the public route unless X-Internal-Secret matches. Kept on the schema for the internal admin path only.
focus_gamesNoGame keys to emphasize, e.g. ['PHI@BOS']. Applies a small documented projection nudge.
allow_lockedNoExplicit replay/late-swap override. Default false blocks slate_id generation once any game has started.
refresh_dataNoForce a fresh V12 data refresh for user-facing generation. Backtests should set false.
exposure_capsNoPer-player exposure caps {name: 0.0-1.0}
contest_fallbackNoEscape hatch when a contest_id cannot be mapped to a slate (contest_slate_unresolved). 'slate_only' + an explicit slate_id builds on THAT slate and skips contest-specific behavior (field-size routing, entry-template mapping) instead of failing the whole generate. Requires slate_id; without it the request still fails closed. Omit for normal contest-anchored builds.
contest_field_sizeNoTotal entries (field size) of the selected contest. Governs the MLB objective: field <= 10 -> max-mean (mlb_small_field_se); field > 10 -> ceiling (mlb_se_ceiling) with a continuous ceiling tilt and the real field size fed into contest simulation. A matched contest_id lobby row is authoritative; this value is the fallback when that row is unavailable.
entry_template_csvNoRaw CSV of a FanDuel entries-upload-template the operator already downloaded. When present, the entry-upload is filled from its OWN entry_ids locally — no FanDuel API / session / PerimeterX call. Fixes fd_entry_template_auth_expired when the user already has the template in hand.
team_exposure_capsNoPer-team portfolio caps, as [["COL",0.5],...] pairs or {"COL":0.5} dict.
candidate_pool_sizeNoExact candidate pool size for Pool→Rank→Keep-N selection. NBA FanDuel: omit it on a single-lineup request without exposure floors and the server uses a pool of 100 (the dashboard default); every other request keeps the preset's own pool (pool = lineups, or the preset's multiplier such as gpp_volume's 2x) unless you set this or pool_oversample_multiplier; cash and gpp_mass_entry never get the default; 0 means the preset multiplier only. MLB: 0/omitted uses the preset multiplier. DraftKings REST ignores these knobs.
contest_max_entriesNoMax entries per user for the selected contest. Used to identify multi-entry mass GPPs (>=4) which keep the caller's preset. Field SIZE, not this, governs the MLB objective — see contest_field_size.
max_hitter_exposureNoPortfolio cap: max share of delivered lineups any ONE hitter may appear in (0.4 = 40%). Pitchers exempt.
max_pitcher_exposureNoPortfolio cap: max share of delivered lineups any ONE pitcher may appear in.
projection_overridesNoUser-uploaded projection/ownership rows. Supports name/player_id/team/position/projection/ownership/ceiling/floor/stddev.
auto_team_exposure_capNoDefault per-team portfolio cap (share of lineups containing ANY given team). Per-team entries in team_exposure_caps win over it.
pool_oversample_multiplierNoCandidate pool multiplier when candidate_pool_size is not set. NBA FanDuel: setting it replaces the single-lineup default pool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / sport / anyOf
      Previous value: -[
      -  {
      -    "pattern": "^(nba|mlb|NBA|MLB)$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^(nba|mlb|nfl|NBA|MLB|NFL)$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / sport / description
      Previous value: -"Sport engine to run: nba or mlb."New value: +"Sport engine to run: nba, mlb or nfl."
  2. Changed2 schema fields changed
    • changedInput schema / properties / candidate_pool_size / description
      Previous value: -"Exact candidate pool size for Pool→Rank→Keep-N selection. 0/None uses preset multiplier."New value: +"Exact candidate pool size for Pool→Rank→Keep-N selection. NBA FanDuel: omit it on a single-lineup request without exposure floors and the server uses a pool of 100 (the dashboard default); every other request keeps the preset's own pool (pool = lineups, or the preset's multiplier such as gpp_volume's 2x) unless you set this or pool_oversample_multiplier; cash and gpp_mass_entry never get the default; 0 means the preset multiplier only. MLB: 0/omitted uses the preset multiplier. DraftKings REST ignores these knobs."
    • changedInput schema / properties / pool_oversample_multiplier / description
      Previous value: -"Candidate pool multiplier when candidate_pool_size is not set."New value: +"Candidate pool multiplier when candidate_pool_size is not set. NBA FanDuel: setting it replaces the single-lineup default pool."
  3. Changed1 schema field changed
    • changedInput schema / properties / team_exposure_caps / type
      Previous value: -"array"New value: +"object"
  4. Changed1 schema field changed
    • changedInput schema / properties / team_exposure_caps / type
      Previous value: -"object"New value: +"array"
  5. Changed1 schema field changed
    • changedInput schema / properties / team_exposure_caps / type
      Previous value: -"array"New value: +"object"
  6. Changed4 schema fields changed
    • addedInput schema / properties / auto_team_exposure_cap
      Added value: +{
      +  "anyOf": [
      +    {
      +      "exclusiveMinimum": 0,
      +      "maximum": 1,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Default per-team portfolio cap (share of lineups containing ANY given team). Per-team entries in team_exposure_caps win over it.",
      +  "title": "auto_team_exposure_cap",
      +  "type": "number"
      +}
    • addedInput schema / properties / max_hitter_exposure
      Added value: +{
      +  "anyOf": [
      +    {
      +      "exclusiveMinimum": 0,
      +      "maximum": 1,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Portfolio cap: max share of delivered lineups any ONE hitter may appear in (0.4 = 40%). Pitchers exempt.",
      +  "title": "max_hitter_exposure",
      +  "type": "number"
      +}
    • addedInput schema / properties / max_pitcher_exposure
      Added value: +{
      +  "anyOf": [
      +    {
      +      "exclusiveMinimum": 0,
      +      "maximum": 1,
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Portfolio cap: max share of delivered lineups any ONE pitcher may appear in.",
      +  "title": "max_pitcher_exposure",
      +  "type": "number"
      +}
    • addedInput schema / properties / team_exposure_caps
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "prefixItems": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "number"
      +          }
      +        ],
      +        "type": "array"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Per-team portfolio caps, as [[\"COL\",0.5],...] pairs or {\"COL\":0.5} dict.",
      +  "title": "team_exposure_caps",
      +  "type": "array"
      +}
  7. Changed1 schema field changed
    • addedInput schema / properties / contest_fallback
      Added value: +{
      +  "anyOf": [
      +    {
      +      "pattern": "^(slate_only)$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Escape hatch when a contest_id cannot be mapped to a slate (contest_slate_unresolved). 'slate_only' + an explicit slate_id builds on THAT slate and skips contest-specific behavior (field-size routing, entry-template mapping) instead of failing the whole generate. Requires slate_id; without it the request still fails closed. Omit for normal contest-anchored builds.",
      +  "title": "contest_fallback",
      +  "type": "string"
      +}
  8. Changed1 schema field changed
    • changedInput schema / properties / contest_field_size / description
      Previous value: -"Total entries (field size) of the selected contest. Governs the MLB objective: field <= 10 -> max-mean (mlb_small_field_se); field > 10 -> ceiling (mlb_se_ceiling) for single-entry contests. A matched contest_id lobby row is authoritative; this value is the fallback when that row is unavailable."New value: +"Total entries (field size) of the selected contest. Governs the MLB objective: field <= 10 -> max-mean (mlb_small_field_se); field > 10 -> ceiling (mlb_se_ceiling) with a continuous ceiling tilt and the real field size fed into contest simulation. A matched contest_id lobby row is authoritative; this value is the fallback when that row is unavailable."
  9. Changed2 schema fields changed
    • changedInput schema / properties / contest_field_size / description
      Previous value: -"Total entries (field size) of the selected contest. Governs the MLB objective: field <= ~9 -> max-mean (mlb_small_field_se); field > 9 -> ceiling (mlb_se_ceiling = gpp_pro_structure + a deep candidate pool) with a continuous ceiling-tilt + the real field size fed into the contest-sim. Fixes the misroute where a single-entry 56-field GPP (max_entries=1) was wrongly built median-EV. Resolved from the live lobby by contest_id when omitted."New value: +"Total entries (field size) of the selected contest. Governs the MLB objective: field <= 10 -> max-mean (mlb_small_field_se); field > 10 -> ceiling (mlb_se_ceiling) for single-entry contests. A matched contest_id lobby row is authoritative; this value is the fallback when that row is unavailable."
    • changedInput schema / properties / plan_only / description
      Previous value: -"When true, the server resolves preset / contest / top-run-env / locks but does NOT run the optimizer. Returns a Plan response (preset reason, contest summary, top game environment from odds, locks/avoids, warnings) so the user can review and confirm before spending credits on a real generate. Costs 0 credits and skips slate_open gating."New value: +"When true, the server resolves preset / contest / authoritative slate / top-run-env / locks but does NOT run the optimizer. Returns a Plan response so the user can review and confirm before spending credits on a real generate. Costs 0 credits; normal slate-open safety checks still apply."
  10. Changed1 schema field changed
    • changedInput schema / properties / contest_field_size / description
      Previous value: -"Total entries (field size) of the selected contest. Governs the MLB objective: field <= ~9 -> max-mean (mlb_small_field_se); field > 9 -> ceiling (gpp_pro_structure) with a continuous ceiling-tilt + the real field size fed into the contest-sim. Fixes the misroute where a single-entry 56-field GPP (max_entries=1) was wrongly built median-EV. Resolved from the live lobby by contest_id when omitted."New value: +"Total entries (field size) of the selected contest. Governs the MLB objective: field <= ~9 -> max-mean (mlb_small_field_se); field > 9 -> ceiling (mlb_se_ceiling = gpp_pro_structure + a deep candidate pool) with a continuous ceiling-tilt + the real field size fed into the contest-sim. Fixes the misroute where a single-entry 56-field GPP (max_entries=1) was wrongly built median-EV. Resolved from the live lobby by contest_id when omitted."
  11. First observed

TDQS

D1.7/5.0
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure, and it discloses nothing—only generic 200/422 response envelopes. For a 32-parameter generation tool that spends credits, requires slate-open safety checks, and has a plan_only dry-run mode, this is a critical omission.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The text is boilerplate OpenAPI response documentation rather than a purpose statement; it is neither front-loaded with intent nor does each sentence earn its place. It is not overly long, but the content present is low-value filler.

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

Completeness1/5

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

A 32-parameter, nested-object, mutation-and-cost tool with no annotations and no output schema demands a real description; what is present covers only HTTP status codes. An agent cannot determine credit cost, ordering constraints against sibling tools, or which parameters matter for common workflows.

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 97%, so the input schema already documents nearly every parameter in detail (preset semantics, exposure caps, contest_field_size routing, deprecated fd_user_id). The description adds no parameter meaning at all, but the baseline of 3 applies because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description is a restatement of the tool name ('Generate Lineups') followed by auto-generated HTTP response examples. It never states the verb+resource in a meaningful way, gives no scope, and does nothing to distinguish this from siblings like list_presets or get_slate_players. Only the example payload (lineups, exposures) hints at what is produced.

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

Usage Guidelines1/5

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

There is zero guidance on when to call this tool, when not to, prerequisites, or alternatives. Nothing indicates that plan_only exists for a dry run, nor that list_presets/list_slates should be consulted first.

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