{"openapi":"3.1.0","info":{"title":"Tile API","version":"0.1.0","description":"A fully local, hand-curated Mahjong rules & scoring reference across four regional variants (Chinese Classical, Japanese Riichi, American, Hong Kong): rule summaries, scoring concepts, 30+ named hand types with cross-variant aliases, a tile/meld glossary, a gameplay-terms glossary, beginner tips and a tile-set composition overview.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://tile.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/tile/docs"},"termsOfService":"https://connectorbay.com/tile/terms"},"servers":[{"url":"https://tile.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/tile/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/rule_lookup":{"post":{"operationId":"rule_lookup","summary":"Full rule summary for one Mahjong variant: region, tile count, turn order, hand requirement, calling","description":"Full rule summary for one Mahjong variant: region, tile count, turn order, hand requirement, calling\n    rules, notable features and scoring style. Use for \"what are the rules of Hong Kong Mahjong\", \"how does\n    turn order work in Riichi\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"variant":{"description":"A Mahjong variant name.","examples":["Chinese Classical","Japanese Riichi","American","Hong Kong"],"minLength":1,"title":"Variant","type":"string"}},"required":["variant"],"title":"rule_lookupArguments","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/tile_glossary":{"post":{"operationId":"tile_glossary","summary":"Definitions of the physical tiles and melds — suits (dots/bams/craks), terminal vs simple, honor","description":"Definitions of the physical tiles and melds — suits (dots/bams/craks), terminal vs simple, honor\n    tiles (winds and dragons), flower/season/joker bonus tiles, and pung/chow/kong/pair melds. Use for\n    \"what's a pung\", \"what does dot/bam/crak mean\", \"what are honor tiles\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"term":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A specific tile/meld term to look up; omit to list all.","examples":["pung","chow","kong","dot","honor tile","flower"],"title":"Term"}},"title":"tile_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/hand_type":{"post":{"operationId":"hand_type","summary":"Full detail for one named scoring hand: its aliases (including per-language names), which variant(s)","description":"Full detail for one named scoring hand: its aliases (including per-language names), which variant(s)\n    recognize it, its category and a qualitative value tier, and a plain-language description. Use for\n    \"what is Thirteen Orphans\", \"what does Pinfu require\", \"is Toitoi a big hand\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"name":{"description":"A named scoring hand.","examples":["Thirteen Orphans","Pinfu","Toitoi","Seven Pairs","Nine Gates"],"minLength":1,"title":"Name","type":"string"}},"required":["name"],"title":"hand_typeArguments","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/scoring_summary":{"post":{"operationId":"scoring_summary","summary":"One variant's scoring approach in plain language — fan-based, han/fu-based, or card-based — without","description":"One variant's scoring approach in plain language — fan-based, han/fu-based, or card-based — without\n    reproducing any rulebook's exact numeric scoring table. Use for \"how does Riichi scoring work\", \"how are\n    points scored in American Mahjong\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"variant":{"description":"A Mahjong variant name.","examples":["Chinese Classical","Japanese Riichi","American","Hong Kong"],"minLength":1,"title":"Variant","type":"string"}},"required":["variant"],"title":"scoring_summaryArguments","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_comparison":{"post":{"operationId":"variant_comparison","summary":"A side-by-side comparison of two named variants' tile count, hand requirement, calling rules,","description":"A side-by-side comparison of two named variants' tile count, hand requirement, calling rules,\n    scoring style and notable features. Use for \"compare American and Japanese Mahjong\", \"Hong Kong vs\n    Chinese Classical, what's different\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"variant_a":{"description":"First variant name.","minLength":1,"title":"Variant A","type":"string"},"variant_b":{"description":"Second variant name.","minLength":1,"title":"Variant B","type":"string"}},"required":["variant_a","variant_b"],"title":"variant_comparisonArguments","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 gameplay and scoring vocabulary that isn't a specific tile or meld — wall, dead wall,","description":"Definitions of gameplay and scoring vocabulary that isn't a specific tile or meld — wall, dead wall,\n    dealer, self-draw, discard, riichi, dora, furiten, fan/han/fu, Charleston, chicken hand, and more. Use\n    for \"what's furiten mean\", \"what is the Charleston\", \"what's the difference between fan and han\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"term":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"A specific gameplay/scoring term to look up; omit to list all.","examples":["wall","riichi","dora","furiten","fan","Charleston"],"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/beginner_tips":{"post":{"operationId":"beginner_tips","summary":"A curated, ordered list of tips for someone new to Mahjong — some general across all variants, some","description":"A curated, ordered list of tips for someone new to Mahjong — some general across all variants, some\n    specific to Japanese Riichi, American, or Hong Kong play. Use for \"what should a Mahjong beginner know\",\n    \"tips for someone new to Riichi\".","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}},"/v1/tools/tileset_overview":{"post":{"operationId":"tileset_overview","summary":"How a physical Mahjong tile set is put together — the three suits, the seven honor tiles, bonus","description":"How a physical Mahjong tile set is put together — the three suits, the seven honor tiles, bonus\n    flower/season/joker tiles, and how total tile count differs by variant (136 vs 144 vs 152). Use for\n    \"how many tiles are in a Mahjong set\", \"what tiles are in the game\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"tileset_overviewArguments","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}}}}