{"openapi":"3.1.0","info":{"title":"Lights Out Play API","version":"0.1.0","description":"A fully local, playable Lights Out engine with guaranteed-solvable puzzle generation and a real Gaussian-elimination-over-GF(2) solver that computes the true minimum press-set. 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://lightsoutplay.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/lightsoutplay/docs"},"termsOfService":"https://connectorbay.com/lightsoutplay/terms"},"servers":[{"url":"https://lightsoutplay.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/lightsoutplay/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 Lights Out puzzle at the requested difficulty, guaranteed solvable. Use for","description":"Generate a new Lights Out puzzle at the requested difficulty, guaranteed solvable. Use for\n    \"let's play lights out\", \"give me a lights out puzzle\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"difficulty":{"default":"easy","description":"'easy' (4x4), 'medium' (5x5, the classic size), or 'hard' (6x6).","title":"Difficulty","type":"string"}},"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/press_cell":{"post":{"operationId":"press_cell","summary":"Press one cell: toggles it and its orthogonal neighbors. Reports whether the board is now fully","description":"Press one cell: toggles it and its orthogonal neighbors. Reports whether the board is now fully\n    off (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"},"row":{"description":"Row index, 0-based.","minimum":0,"title":"Row","type":"integer"},"col":{"description":"Column index, 0-based.","minimum":0,"title":"Col","type":"integer"}},"required":["state","row","col"],"title":"press_cellArguments","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":"Return one cell from the mathematically proven MINIMUM press-set for the current board,","description":"Return one cell from the mathematically proven MINIMUM press-set for the current board,\n    computed by real Gaussian elimination over GF(2) (with an exhaustive null-space search for board\n    sizes that have quiet patterns), plus the full press-set for context. Does not modify the state.","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":"Check whether every light is off.","description":"Check whether every light is off.","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/solve":{"post":{"operationId":"solve","summary":"Compute the full, mathematically proven MINIMUM press-set for the current board via real","description":"Compute the full, mathematically proven MINIMUM press-set for the current board via real\n    Gaussian elimination over GF(2) (including an exhaustive null-space search), for verification or\n    for a player who wants to see the full 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":"solveArguments","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_board":{"post":{"operationId":"render_board","summary":"Render the current grid as human-readable text.","description":"Render the current grid as human-readable text.","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_boardArguments","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 Lights Out's rules, the difficulty levels, and how hints and generation work.","description":"Explain Lights Out's rules, the difficulty levels, and how hints and generation 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}}}}