{"openapi":"3.1.0","info":{"title":"Codepeg API","version":"0.1.0","description":"A fully local, hand-curated reference for code-breaking and feedback-based guessing games: generic peg-and-color deduction mechanics, digit-position deduction, fixed-length word-guessing with letter feedback, and 15+ named variants, each described in original language, plus a real combinatorics calculator, strategy tips, feedback-system explainers, a glossary, group-size suggestions and beginner tips.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://codepeg.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/codepeg/docs"},"termsOfService":"https://connectorbay.com/codepeg/terms"},"servers":[{"url":"https://codepeg.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/codepeg/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/mechanic_info":{"post":{"operationId":"mechanic_info","summary":"Explains one generic named mechanic used across code-breaking and feedback-guessing games — feedback","description":"Explains one generic named mechanic used across code-breaking and feedback-guessing games — feedback\n    types, scoring rules, setup knobs, strategy techniques, rule variants and formats. Use for \"what does\n    minimax mean here\", \"how does duplicate-color scoring work\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"description":"A generic game-mechanic name.","examples":["exact match feedback","minimax strategy","duplicate-symbol handling","hard mode"],"minLength":1,"title":"Name","type":"string"}},"required":["name"],"title":"mechanic_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/game_type_list":{"post":{"operationId":"game_type_list","summary":"Every core game type this reference covers, with its default code length, symbol-pool size, whether","description":"Every core game type this reference covers, with its default code length, symbol-pool size, whether\n    repeats are allowed by default, typical player count and difficulty. Use for \"what kinds of code-breaking\n    games do you cover\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"game_type_listArguments","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/optimal_strategy_tip":{"post":{"operationId":"optimal_strategy_tip","summary":"Five concrete strategy tips for playing one game type well, covering opening guesses, reading","description":"Five concrete strategy tips for playing one game type well, covering opening guesses, reading\n    feedback, and elimination technique. Use for \"what's the best strategy for guessing\", \"how do I open a\n    round\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"game_type":{"description":"A game type's name or id.","examples":["peg-and-color code breaking","digit-position deduction","word guessing","wordle","mastermind"],"minLength":1,"title":"Game Type","type":"string"}},"required":["game_type"],"title":"optimal_strategy_tipArguments","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/feedback_system_explainer":{"post":{"operationId":"feedback_system_explainer","summary":"Explains exactly how one game type's feedback works after a guess — e.g. black/white (exact/partial)","description":"Explains exactly how one game type's feedback works after a guess — e.g. black/white (exact/partial)\n    peg counts, or green/yellow/gray letter tiles — including how repeated symbols are scored without\n    double-counting. Use for \"how does the feedback work\", \"what do the colored tiles mean\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"game_type":{"description":"A game type's name or id.","examples":["peg-and-color code breaking","digit-position deduction","word guessing"],"minLength":1,"title":"Game Type","type":"string"}},"required":["game_type"],"title":"feedback_system_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/combinatorics_note":{"post":{"operationId":"combinatorics_note","summary":"A REAL combinatorics calculation: exactly how many possible codes exist for a given code length and","description":"A REAL combinatorics calculation: exactly how many possible codes exist for a given code length and\n    symbol-pool size, computed both with and without repeated symbols allowed, plus the implied\n    information-theoretic bit count. Use for \"how many possible codes are there with 4 slots and 6 colors\",\n    \"how big is the search space for a 5-letter word\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"game_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A game type's name or id, for defaults and context; omit for a generic calculation.","examples":["peg-and-color code breaking","word guessing"],"title":"Game Type"},"code_length":{"default":4,"description":"Number of positions/slots in the code.","examples":[4,5],"maximum":12,"minimum":1,"title":"Code Length","type":"integer"},"colors_or_letters":{"default":6,"description":"Size of the symbol pool (colors, letters or digits available).","examples":[6,26,10],"maximum":50,"minimum":1,"title":"Colors Or Letters","type":"integer"},"allow_repeats":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"Whether a symbol may repeat within the code; omit to use the game type's default.","title":"Allow Repeats"}},"title":"combinatorics_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/term_glossary":{"post":{"operationId":"term_glossary","summary":"Definitions of common code-breaking / feedback-guessing terms — peg, code, codemaker, exact/partial","description":"Definitions of common code-breaking / feedback-guessing terms — peg, code, codemaker, exact/partial\n    match, minimax strategy, entropy, tile, answer list, worst-case guess bound, .... Use for \"what's a\n    partial match\", \"what does entropy mean here\".","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 for one of 15+ named variants of these games — size variants, duel and battle-royale","description":"Full detail for one of 15+ named variants of these games — size variants, duel and battle-royale\n    formats, party/team formats, accessible and daily-puzzle formats. Use for \"what's speed mode\", \"what's a\n    battle royale version of this\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"description":"A variant's name or id.","examples":["mini three-slot, four-color","duel","team relay","speed round","daily shared word puzzle"],"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/find_game_for_group":{"post":{"operationId":"find_game_for_group","summary":"Suggests game types and variants suited to a given number of players — from solo word-guessing to","description":"Suggests game types and variants suited to a given number of players — from solo word-guessing to\n    large team-relay or battle-royale formats. Use for \"what's a good code-breaking game for 6 people\",\n    \"any version of this for one player\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"player_count":{"description":"Number of people who want to play.","examples":[2,4,8],"maximum":20,"minimum":1,"title":"Player Count","type":"integer"}},"required":["player_count"],"title":"find_game_for_groupArguments","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 curated, ranked shortlist of the most useful tips for someone brand new to this whole family of","description":"A curated, ranked shortlist of the most useful tips for someone brand new to this whole family of\n    code-breaking and feedback-guessing games. Use for \"I'm new to this, what should I know\", \"tips for a\n    beginner\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"count":{"default":5,"description":"How many tips to return.","maximum":10,"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}}}}