{"openapi":"3.1.0","info":{"title":"Nimber API","version":"0.1.0","description":"A fully local, hand-curated combinatorial game theory reference centered on Nim: genuine nim-sum (XOR) math to analyze any multi-pile Nim position and find a winning move (including misere play), plus original explainers for the Sprague-Grundy theorem, P-positions/N-positions, Nim variants, other classic impartial games (Wythoff's Game, Chomp, Hackenbush, Kayles, and more), a term glossary, history notes and beginner tips. Keyless; fully local; zero upstream calls.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://nimber.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/nimber/docs"},"termsOfService":"https://connectorbay.com/nimber/terms"},"servers":[{"url":"https://nimber.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/nimber/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/nim_position_analyzer":{"post":{"operationId":"nim_position_analyzer","summary":"Genuine nim-sum (XOR) analysis of a Nim position: the nim-sum, a binary breakdown of every pile,","description":"Genuine nim-sum (XOR) analysis of a Nim position: the nim-sum, a binary breakdown of every pile,\n    whether it's a P-position (loss for the player to move) or N-position (win for them), and an example\n    winning move if one exists. Real live arithmetic, not a lookup. Use for \"is piles 3, 4, 5 a winning\n    position\", \"am I winning or losing with piles 7 and 9\", \"analyze this Nim position for me\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pile_sizes":{"description":"The size of each pile in the Nim position, in any order.","examples":[[3,4,5],[1,3,5,7],[7,7]],"items":{"maximum":1000000,"minimum":0,"type":"integer"},"maxItems":64,"minItems":1,"title":"Pile Sizes","type":"array"},"misere":{"default":false,"description":"Play under the misere convention (last player to move LOSES) instead of the default normal convention (last player to move WINS).","title":"Misere","type":"boolean"}},"required":["pile_sizes"],"title":"nim_position_analyzerArguments","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/find_winning_move":{"post":{"operationId":"find_winning_move","summary":"Every winning move available from a Nim position (there can be more than one), computed live via","description":"Every winning move available from a Nim position (there can be more than one), computed live via\n    real nim-sum arithmetic — or an explanation that none exists because the position is already a\n    P-position. Use for \"what move should I make with piles 7, 9 and 2\", \"how do I win from piles 5, 5,\n    3\", \"find every winning move for this misere Nim position\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pile_sizes":{"description":"The size of each pile in the Nim position, in any order.","examples":[[3,4,5],[1,3,5,7],[7,7]],"items":{"maximum":1000000,"minimum":0,"type":"integer"},"maxItems":64,"minItems":1,"title":"Pile Sizes","type":"array"},"misere":{"default":false,"description":"Play under the misere convention (last player to move LOSES) instead of the default normal convention (last player to move WINS).","title":"Misere","type":"boolean"}},"required":["pile_sizes"],"title":"find_winning_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/game_info":{"post":{"operationId":"game_info","summary":"Full detail on a classic combinatorial game other than plain Nim: how it's played, the key theory","description":"Full detail on a classic combinatorial game other than plain Nim: how it's played, the key theory\n    behind it, and a historical origin note. Covers Wythoff's Game, Chomp, Hackenbush, Kayles, Dawson's\n    Chess, Turning Games, Northcott's Game, Subtraction Games, and the 21 Game. Use variant_info for Nim's\n    own variants instead. Use for \"what is Wythoff's Game\", \"how do you play Chomp\", \"explain Hackenbush\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"description":"A combinatorial game's name or alias.","examples":["Wythoff's Game","Chomp","Hackenbush","Kayles","the 21 Game"],"minLength":1,"title":"Name","type":"string"}},"required":["name"],"title":"game_infoArguments","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/concept_explainer":{"post":{"operationId":"concept_explainer","summary":"In-depth explanation of a combinatorial game theory concept, with a worked example where one helps:","description":"In-depth explanation of a combinatorial game theory concept, with a worked example where one helps:\n    the Sprague-Grundy theorem, Grundy values/nimbers, mex, P-positions, N-positions, normal vs misere\n    play, impartial vs partisan games, disjunctive sums, Bouton's theorem, and Zermelo's theorem. Use for\n    \"what's the Sprague-Grundy theorem\", \"explain mex\", \"what's the difference between a P-position and an\n    N-position\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"description":"A combinatorial game theory concept's name or alias.","examples":["Sprague-Grundy theorem","nimber","P-position","mex","misere play"],"minLength":1,"title":"Name","type":"string"}},"required":["name"],"title":"concept_explainerArguments","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/term_glossary":{"post":{"operationId":"term_glossary","summary":"Short definitions of Nim/combinatorial-game-theory vocabulary — heap, nim-sum, XOR, Grundy value,","description":"Short definitions of Nim/combinatorial-game-theory vocabulary — heap, nim-sum, XOR, Grundy value,\n    mex, P-position, N-position, impartial/partisan game, normal/misere play, and more. Use for \"what does\n    'nim-sum' mean\", \"define mex\", \"what's an octal game\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"term":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A specific term to look up; omit to list all.","title":"Term"}},"title":"term_glossaryArguments","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/variant_info":{"post":{"operationId":"variant_info","summary":"Full detail on a variant of Nim itself: how it's played, the key theory behind it, and a historical","description":"Full detail on a variant of Nim itself: how it's played, the key theory behind it, and a historical\n    origin note. Covers standard multi-pile Nim, single-pile Nim, misere Nim, bounded (max-remove) Nim,\n    Moore's Nim_k, Lasker's Nim, Fibonacci Nim, and Marienbad Nim. Use game_info for other, non-Nim\n    combinatorial games instead. Use for \"what is misere Nim\", \"explain Moore's Nim_k\", \"what's Marienbad\n    Nim\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"description":"A Nim variant's name or alias.","examples":["standard Nim","misere Nim","Moore's Nim_k","Lasker's Nim","Fibonacci Nim","Marienbad Nim"],"minLength":1,"title":"Name","type":"string"}},"required":["name"],"title":"variant_infoArguments","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/history_note":{"post":{"operationId":"history_note","summary":"A timeline of real historical milestones in the study of Nim and combinatorial game theory, from","description":"A timeline of real historical milestones in the study of Nim and combinatorial game theory, from\n    Bouton's 1901 solution of Nim through the Sprague-Grundy theorem to modern systematization. Use for\n    \"when was Nim first solved\", \"history of combinatorial game theory\", \"who discovered the\n    Sprague-Grundy theorem\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"history_noteArguments","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/beginner_tips":{"post":{"operationId":"beginner_tips","summary":"A ranked shortlist of tips for someone new to Nim and combinatorial game theory — how to compute","description":"A ranked shortlist of tips for someone new to Nim and combinatorial game theory — how to compute\n    nim-sum by hand, common misconceptions, and how to build intuition. Use for \"tips for learning Nim\",\n    \"how do I get better at combinatorial game theory\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"count":{"default":5,"description":"How many tips to return.","maximum":12,"minimum":1,"title":"Count","type":"integer"}},"title":"beginner_tipsArguments","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}}}}