{"openapi":"3.1.0","info":{"title":"Blackjack Trainer API","version":"0.1.0","description":"A real, stateless, playable blackjack engine (hit/stand/double/split, a fixed hit-soft-17 dealer rule) plus a genuine basic-strategy advisor. Every tool call takes the full game state and returns the new state; nothing is stored server-side.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://blackjacktrainer.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/blackjacktrainer/docs"},"termsOfService":"https://connectorbay.com/blackjacktrainer/terms"},"servers":[{"url":"https://blackjacktrainer.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/blackjacktrainer/docs"},"security":[{},{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/new_round":{"post":{"operationId":"new_round","summary":"Shuffles a fresh shoe and deals a new round: 2 cards to the player, 2 to the dealer (one","description":"Shuffles a fresh shoe and deals a new round: 2 cards to the player, 2 to the dealer (one\n    hidden). Use for \"let's play blackjack\", \"deal me in\", \"new hand\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"num_decks":{"default":6,"description":"How many 52-card decks make up the shoe.","maximum":8,"minimum":1,"title":"Num Decks","type":"integer"},"bet":{"default":10,"description":"Bet size in arbitrary units for this round's first hand.","minimum":1,"title":"Bet","type":"integer"}},"title":"new_roundArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_valid_moves":{"post":{"operationId":"get_valid_moves","summary":"Lists legal actions (from hit/stand/double/split) for one hand right now; empty once it's","description":"Lists legal actions (from hit/stand/double/split) for one hand right now; empty once it's\n    not that hand's turn or the round has moved on. Use for \"what can I do here\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_round/make_move/dealer_play.","examples":[{"current_hand":0,"dealer":["6D","9C"],"dealer_hole_hidden":true,"hands":[{"bet":10,"cards":["AS","8H"],"doubled":false,"from_split":false,"status":"playing"}],"num_decks":6,"phase":"player_turn","shoe":["7H","2C"]}],"title":"State","type":"object"},"hand_index":{"default":0,"description":"Which of the player's hands to check (0 unless you've split).","minimum":0,"title":"Hand Index","type":"integer"}},"required":["state"],"title":"get_valid_movesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/make_move":{"post":{"operationId":"make_move","summary":"Applies hit/stand/double/split to one hand and returns the new state. status is","description":"Applies hit/stand/double/split to one hand and returns the new state. status is\n    invalid_move, playing, stood, bust, blackjack, or split (after a successful split). Once every\n    hand is resolved, phase becomes \"dealer_turn\" -- call `dealer_play` next. Use for \"I'll hit\",\n    \"stand\", \"double down\", \"split these\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_round/make_move/dealer_play.","examples":[{"current_hand":0,"dealer":["6D","9C"],"dealer_hole_hidden":true,"hands":[{"bet":10,"cards":["AS","8H"],"doubled":false,"from_split":false,"status":"playing"}],"num_decks":6,"phase":"player_turn","shoe":["7H","2C"]}],"title":"State","type":"object"},"move":{"description":"hit, stand, double, or split.","title":"Move","type":"string"},"hand_index":{"default":0,"description":"Which hand to act on (0 unless you've split).","minimum":0,"title":"Hand Index","type":"integer"}},"required":["state","move"],"title":"make_moveArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/dealer_play":{"post":{"operationId":"dealer_play","summary":"Reveals the dealer's hole card and plays out the dealer's hand under the fixed house rule","description":"Reveals the dealer's hole card and plays out the dealer's hand under the fixed house rule\n    (hit soft 17, stand hard 17+), then settles every hand's outcome and payout. Only valid once\n    phase is \"dealer_turn\" (i.e. every player hand has stood, busted, or is a natural blackjack).\n    Use for \"let the dealer play\", \"reveal the hole card\", \"settle the hand\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_round/make_move/dealer_play.","examples":[{"current_hand":0,"dealer":["6D","9C"],"dealer_hole_hidden":true,"hands":[{"bet":10,"cards":["AS","8H"],"doubled":false,"from_split":false,"status":"playing"}],"num_decks":6,"phase":"player_turn","shoe":["7H","2C"]}],"title":"State","type":"object"}},"required":["state"],"title":"dealer_playArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/render":{"post":{"operationId":"render","summary":"A human-readable table view: dealer's cards (hole card hidden until dealer_play), every","description":"A human-readable table view: dealer's cards (hole card hidden until dealer_play), every\n    player hand with its total and status, whose turn it is, and shoe size. Use for \"show me the\n    table\", \"what's my hand\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_round/make_move/dealer_play.","examples":[{"current_hand":0,"dealer":["6D","9C"],"dealer_hole_hidden":true,"hands":[{"bet":10,"cards":["AS","8H"],"doubled":false,"from_split":false,"status":"playing"}],"num_decks":6,"phase":"player_turn","shoe":["7H","2C"]}],"title":"State","type":"object"}},"required":["state"],"title":"renderArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/basic_strategy_advice":{"post":{"operationId":"basic_strategy_advice","summary":"Returns the mathematically standard basic-strategy action (hit/stand/double/split) for a","description":"Returns the mathematically standard basic-strategy action (hit/stand/double/split) for a\n    hand against a dealer up-card, from a real decision table for a multi-deck, dealer-hits-soft-17\n    game -- plus the reasoning. This is advice; it does not itself apply a move. Use for \"what\n    should I do here\", \"is hitting right\", \"does basic strategy say to split these\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"player_cards":{"description":"The hand to get advice for, e.g. ['AS', '8H'].","examples":[["10H","6C"]],"items":{"type":"string"},"title":"Player Cards","type":"array"},"dealer_up_card":{"description":"The dealer's visible card, e.g. '9C'.","title":"Dealer Up Card","type":"string"},"can_double":{"default":true,"description":"Whether doubling is currently available for this hand.","title":"Can Double","type":"boolean"},"can_split":{"default":true,"description":"Whether splitting is currently available for this hand.","title":"Can Split","type":"boolean"}},"required":["player_cards","dealer_up_card"],"title":"basic_strategy_adviceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}