{"openapi":"3.1.0","info":{"title":"Pyramid Solitaire API","version":"0.1.0","description":"A real, stateless, playable single-player card game: genuine 28-card 7-row pyramid deal plus a 24-card stock, real move validation (only uncovered cards selectable, pairs summing to 13, Kings alone), win detection, and a real no-more-moves check. 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://pyramidsolitaire.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/pyramidsolitaire/docs"},"termsOfService":"https://connectorbay.com/pyramidsolitaire/terms"},"servers":[{"url":"https://pyramidsolitaire.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/pyramidsolitaire/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_game":{"post":{"operationId":"new_game","summary":"Shuffles a real 52-card deck and deals the standard 28-card, 7-row pyramid, with the","description":"Shuffles a real 52-card deck and deals the standard 28-card, 7-row pyramid, with the\n    remaining 24 as the stock. Use for \"let's play pyramid solitaire\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Optional integer seed for a reproducible shuffle (testing/demos). Omit for a real random shuffle.","title":"Seed"}},"title":"new_gameArguments","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":"Validates and applies one move per real Pyramid rules, returning the new state with an","description":"Validates and applies one move per real Pyramid rules, returning the new state with an\n    informative message or rejection reason.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_game or make_move. Carry it forward between calls; there is no server-side session.","title":"State","type":"object"},"move":{"additionalProperties":true,"description":"{'action': 'draw'} | {'action': 'remove_pair', 'a': loc, 'b': loc} | {'action': 'remove_king', 'target': loc}, where loc is {'row': int (0-6), 'col': int (0-row)} for a pyramid cell, or {'waste': true} for the current waste-top card.","examples":[{"action":"draw"},{"a":{"col":0,"row":6},"action":"remove_pair","b":{"col":1,"row":6}},{"action":"remove_king","target":{"waste":true}}],"title":"Move","type":"object"}},"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/draw":{"post":{"operationId":"draw","summary":"Draws one card from the stock to the waste; recycles the waste back into the stock if the","description":"Draws one card from the stock to the waste; recycles the waste back into the stock if the\n    stock is empty. Use for \"draw a card\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_game or make_move. Carry it forward between calls; there is no server-side session.","title":"State","type":"object"}},"required":["state"],"title":"drawArguments","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/remove_pair":{"post":{"operationId":"remove_pair","summary":"Removes two currently-selectable cards (pyramid cells and/or the waste top) whose ranks sum","description":"Removes two currently-selectable cards (pyramid cells and/or the waste top) whose ranks sum\n    to exactly 13. Use for \"remove the 7 and the 6\", \"pair the waste card with that 9\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_game or make_move. Carry it forward between calls; there is no server-side session.","title":"State","type":"object"},"a":{"additionalProperties":true,"description":"{'row': int (0-6), 'col': int (0-row)} for a pyramid cell, or {'waste': true} for the current waste-top card.","title":"A","type":"object"},"b":{"additionalProperties":true,"description":"{'row': int (0-6), 'col': int (0-row)} for a pyramid cell, or {'waste': true} for the current waste-top card.","title":"B","type":"object"}},"required":["state","a","b"],"title":"remove_pairArguments","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/remove_king":{"post":{"operationId":"remove_king","summary":"Removes a single, currently-selectable King (never paired with another card). Use for","description":"Removes a single, currently-selectable King (never paired with another card). Use for\n    \"remove that king\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_game or make_move. Carry it forward between calls; there is no server-side session.","title":"State","type":"object"},"target":{"additionalProperties":true,"description":"{'row': int (0-6), 'col': int (0-row)} for a pyramid cell, or {'waste': true} for the current waste-top card.","title":"Target","type":"object"}},"required":["state","target"],"title":"remove_kingArguments","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 every currently legal move (every valid pair removal, King removal, and draw if","description":"Lists every currently legal move (every valid pair removal, King removal, and draw if\n    available) as ready-to-use move objects. Use for \"what can I do\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_game or make_move. Carry it forward between calls; there is no server-side session.","title":"State","type":"object"}},"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/hint":{"post":{"operationId":"hint","summary":"A real hint: a pyramid-only pair/King removal if one exists, then a waste-involving one,","description":"A real hint: a pyramid-only pair/King removal if one exists, then a waste-involving one,\n    then drawing, or a genuine 'no more moves' report if nothing at all is legal. Use for \"give me\n    a hint\", \"am I stuck\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_game or make_move. Carry it forward between calls; there is no server-side session.","title":"State","type":"object"}},"required":["state"],"title":"hintArguments","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 text rendering of the pyramid, stock, and waste. Use for \"show me the","description":"A human-readable text rendering of the pyramid, stock, and waste. Use for \"show me the\n    board\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"The current game state, exactly as returned by new_game or make_move. Carry it forward between calls; there is no server-side session.","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}}}}