{"openapi":"3.1.0","info":{"title":"Logic Grid Puzzle API","version":"0.1.0","description":"A fully local, playable 'who owns the zebra'-style logic-grid puzzle generator and solver, with every puzzle's unique solution proven by an exact constraint-satisfaction search. Stateless: the caller holds the puzzle state between calls.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://logicgridpuzzle.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/logicgridpuzzle/docs"},"termsOfService":"https://connectorbay.com/logicgridpuzzle/terms"},"servers":[{"url":"https://logicgridpuzzle.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/logicgridpuzzle/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_puzzle":{"post":{"operationId":"new_puzzle","summary":"Generate a new logic grid puzzle with a proven unique solution, and return its clues. Use for","description":"Generate a new logic grid puzzle with a proven unique solution, and return its clues. Use for\n    \"give me a logic puzzle\", \"start a zebra-style puzzle on hard difficulty\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"difficulty":{"default":"medium","description":"'easy' (3x3), 'medium' (4x3), or 'hard' (4x4) -- controls grid size and category count.","title":"Difficulty","type":"string"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Optional RNG seed for a reproducible puzzle (mainly for testing).","title":"Seed"}},"title":"new_puzzleArguments","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_deduction":{"post":{"operationId":"make_deduction","summary":"Record a deduction (category, value, position) and check it against the real solution. Positions","description":"Record a deduction (category, value, position) and check it against the real solution. Positions\n    are 1-indexed for the player.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"Current puzzle state, exactly as returned by a previous call.","title":"State","type":"object"},"category":{"description":"Which attribute category the value belongs to, e.g. 'color'.","title":"Category","type":"string"},"value":{"description":"The value you're placing, e.g. 'Red'.","title":"Value","type":"string"},"position":{"description":"The 1-indexed position you claim this value occupies.","minimum":1,"title":"Position","type":"integer"}},"required":["state","category","value","position"],"title":"make_deductionArguments","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_hint":{"post":{"operationId":"get_hint","summary":"Reveal one logically forced deduction not yet recorded, with the proof that no other position","description":"Reveal one logically forced deduction not yet recorded, with the proof that no other position\n    for that value is consistent with the puzzle's clues. Returns ok=false if nothing remains to deduce.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"Current puzzle state, exactly as returned by a previous call.","title":"State","type":"object"}},"required":["state"],"title":"get_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/check_solution":{"post":{"operationId":"check_solution","summary":"Report how many cells have been filled, whether everything filled so far is correct, and whether","description":"Report how many cells have been filled, whether everything filled so far is correct, and whether\n    the puzzle is fully solved.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"Current puzzle state, exactly as returned by a previous call.","title":"State","type":"object"}},"required":["state"],"title":"check_solutionArguments","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_puzzle":{"post":{"operationId":"render_puzzle","summary":"Render the clues and the player's current partial grid as human-readable text. Never reveals the","description":"Render the clues and the player's current partial grid as human-readable text. Never reveals the\n    solution.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"Current puzzle state, exactly as returned by a previous call.","title":"State","type":"object"}},"required":["state"],"title":"render_puzzleArguments","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/reveal_solution":{"post":{"operationId":"reveal_solution","summary":"Reveal the full solution, position by position -- use for a clean end-of-game reveal or a","description":"Reveal the full solution, position by position -- use for a clean end-of-game reveal or a\n    give-up.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"state":{"additionalProperties":true,"description":"Current puzzle state, exactly as returned by a previous call.","title":"State","type":"object"}},"required":["state"],"title":"reveal_solutionArguments","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/rules_info":{"post":{"operationId":"rules_info","summary":"Explain logic grid puzzles: how to play, the clue types, the uniqueness guarantee, and how hints","description":"Explain logic grid puzzles: how to play, the clue types, the uniqueness guarantee, and how hints\n    work.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"rules_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}}}}