Skip to main content
Glama

betting_build_parlay

Build Parlay

Deterministic parlay analysis for BOTH leg shapes. Body: {legs:[...], ticket_odds?}. PROP legs {name, prop, threshold} keep the legacy correlation-aware EV. GAME-side legs (ML / run line / total / team total / F5, selected by the market field) — the slips users actually paste — are priced from the CURRENT de-vigged market at that exact market/ line (canonical team resolution), falling back to the market-anchored run model for totals; per-leg fair prob + edge vs the slip's price, combined payout / breakeven / fair prob / EV under a documented independence assumption. Legs sharing a game are flagged correlated=true and get a correlation_warning INSTEAD of a combined edge. ticket_odds (the slip's printed combined price) is verified vs the leg product — >2% off flags ticket_odds_mismatch (the slip was misread; do not trust the numbers). NEVER estimate a parlay in prose — this endpoint is the math.

Responses:

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

Example Response:

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
legsYes
ticket_oddsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • addedInput schema / properties / legs / items / description
      Added value: +"One parlay leg — TWO shapes, discriminated by the `market` field.\n\nPROP leg (legacy):   {name, prop, threshold?}\nGAME-side leg (C12): {market: moneyline|run_line|total|team_total|\n                      f5_moneyline|f5_total, team, side: over/under/home/\n                      away/<team>, line?, american_odds (the SLIP's price —\n                      authoritative for the payout math)}."
    • addedInput schema / properties / legs / items / properties / american_odds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "American Odds"
      +}
    • addedInput schema / properties / legs / items / properties / line
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Line"
      +}
    • addedInput schema / properties / legs / items / properties / market
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Market"
      +}
    • addedInput schema / properties / legs / items / properties / name / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / legs / items / properties / name / type
      Removed value: -"string"
    • addedInput schema / properties / legs / items / properties / side
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Side"
      +}
    • addedInput schema / properties / legs / items / properties / team
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Team"
      +}
    • removedInput schema / properties / legs / items / required
      Removed value: -[
      -  "name"
      -]
    • addedInput schema / properties / ticket_odds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "ticket_odds",
      +  "type": "integer"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the burden. It discloses determinism, de-vigged market pricing, fallback behavior, independence assumptions, correlation warnings, ticket odds verification, mismatch flags, and caution not to trust misread slips — detailed and actionable beyond any annotation.

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 core content is dense and front-loaded, with no filler, but the appended 'Responses' section and Example Response repeat generic OpenAPI boilerplate rather than adding useful behavioral detail. Still, every substantive sentence earns its place.

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?

For a complex tool with two leg shapes, multiple game markets, pricing logic, and validation edge cases, the description explains input structure, input semantics, behavioral assumptions, warnings, and output dimensions (payout, breakeven, fair prob, EV). No output schema is provided, yet the description still covers the essential return values.

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

Parameters5/5

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

Schema description coverage is 0%, but the description compensates richly. It explains the body shape, both leg shapes, the role of ticket_odds, what american_odds means, which markets are allowed, and how prices are used. This goes far beyond the raw 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+resource: 'Build Parlay' — deterministic parlay analysis for both leg shapes. It clearly differentiates from siblings by framing this as the math endpoint for parlay construction, not a general betting analysis tool.

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?

It gives strong context for when to use it: users paste slips, legs need pricing, or a parlay must be evaluated. It implies 'this endpoint is the math' and warns not to estimate in prose, but it does not explicitly list alternatives or exclusions compared to siblings like betting_scan_edges or betting_best_bets.

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