Pokerai API

v0.2.0
io.github.pokerai-bet/mcp Checked 1 day ago Published 5 days ago

Browse postflop cache coverage and read Flop, Turn and River GTO strategy for study.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

preflop_versions List preflop strategy versions

The selectable preflop_version values (id + human label) and which is the default. Free (no quota). Call this before assuming a version id.

preflop_strategy Preflop GTO strategy for a hand

GTO mixed strategy (fold/call/raise frequencies + sizes) for a specific hand facing a preflop action line, 6-max 100bb. Charges 1 presolved quota. The situation (RFI/3-bet/4-bet/...) is derived from the actions.

ParameterTypeDescription
hero *stringhero position: UTG / MP / CO / BTN / SB / BB
hole_cards *stringhero's two cards, e.g. 'AhKh'
preflop_actions *arrayfull action sequence including blinds, e.g. [{position:'SB',action:'small blind',amount:0.5},{position:'BB',action:'big blind',amount:1},{position:'UTG',action:'raise',amount:3}]
preflop_versionstringchart-set id from preflop_versions; omit for the default

preflop_range Whole preflop range for a spot

The full 169-hand-type range (fold/call/raise per hand type: AA, AKs, AKo, ...) for a position + action line. No hole_cards. Charges 1 presolved quota (one call, not 169).

ParameterTypeDescription
hero *stringthe position whose range you want: UTG / MP / CO / BTN / SB / BB
preflop_actions *arrayaction sequence incl. blinds; the range is for `hero` acting after these actions
preflop_versionstringchart-set id from preflop_versions; omit for the default
table_sizestringdefaults to '6max'

flop_tree Flop decision tree

Starting ranges + every decision node for a flop spot. In the response each node has `node`, its path (e.g. root/CHECK), and `token`; pass `token` as the `node` argument of flop_node. Charges 1 presolved quota. Single-street (for turn/river use the solver tools).

ParameterTypeDescription
board *stringthe 3 flop cards, e.g. '2c2h2s'
positions *objectroles→positions. SRP: {hero,raiser,caller}; 3BET/4BET: {hero,raiser,three_bettor}; LIMP: {hero,limper} (hero or limper must be BB)
pot_type *string
flop_versionstringflop dataset id, same values as preflop_versions; omit for the default dataset (6max). Some boards have no data in the default dataset: the call returns 404 and still charges 1 presolved quota, so ret…

flop_node Flop node strategy

Strategy at one flop decision-tree node. Pass a `node` token minted by flop_tree. With hole_cards → that hand's mixed strategy at the node; omit → the node's whole-range strategy. Free (token-gated).

ParameterTypeDescription
node *stringnode token from flop_tree
hole_cardsstringoptional hero hand, e.g. 'AdKd'

postflop_cache_coverage Browse persistent postflop cache coverage

List cached preset roots for one preflop pack and exact flop spelling. Free for all valid API keys. For another page, pass next_cursor with the original pack and board, even if items is empty. A null next_cursor ends pagination. Select a returned item only when needed for a strategy query.

ParameterTypeDescription
board *stringthree cards without separators, e.g. '2c2d2h'
preflop_pack *stringpreflop pack ID from preflop_versions or coverage
cursorstringopaque next_cursor returned for the same pack and board
limitinteger

postflop_cache_query Read cached Flop, Turn or River strategy

Builder/Pro only. Pass a coverage item for a Flop root, or pass a returned token as node to continue. Follow a returned child token to reach an action or chance node. To deal a street, pass the chance node's token plus only the requested turn_card or river_card. Require explicit user intent before each root or deal: each costs one cache query after admission, even if the read misses or fails. A token-only continuation (optionally with hole_cards) is free. Use the returned cache_quota receipt when present. Do not retry automatically or fall back to a solve.

ParameterTypeDescription
boardstringthree cards without separators, e.g. '2c2d2h'
hole_cardsstringoptional hero hand, e.g. 'AdKd'
nodestringopaque token from postflop_cache_query
positionsobjectCopy positions from a coverage item. SRP needs raiser and caller, 3BET/4BET need raiser and three_bettor, LIMP needs caller and checker (plus hero in all cases).
pot_typestring
preflop_packstringpreflop pack ID from preflop_versions or coverage
river_carddeal at a Turn chance node, e.g. 'Qh'
turn_cardstringdeal at a Flop chance node, e.g. 'Td'