{"openapi":"3.1.0","info":{"title":"Splitbill API","version":"0.1.0","description":"A fully local group expense-splitting calculator toolkit: even splits and itemized splits (with tax/tip allocated proportionally to each person's subtotal), plus a greedy debt-simplification settlement optimizer that minimizes the number of payments needed to settle a group's balances — zero upstream calls, computed from the numbers you provide.\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://splitbill.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/splitbill/docs"},"termsOfService":"https://connectorbay.com/splitbill/terms"},"servers":[{"url":"https://splitbill.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/splitbill/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/even_split":{"post":{"operationId":"even_split","summary":"Splits a bill subtotal (plus tax/tip) equally among a list of people, rounded with the largest-remainder","description":"Splits a bill subtotal (plus tax/tip) equally among a list of people, rounded with the largest-remainder\n    method so shares always sum exactly to the grand total. Use for \"split $120 four ways with 20% tip\", \"I paid\n    $85, split it evenly among the 4 of us, who owes me what\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"subtotal":{"description":"Bill subtotal before tax/tip.","exclusiveMinimum":0,"title":"Subtotal","type":"number"},"people":{"description":"Names of everyone splitting the bill.","items":{"type":"string"},"title":"People","type":"array"},"tax_pct":{"default":0.0,"description":"Tax rate, %, applied to the subtotal.","minimum":0,"title":"Tax Pct","type":"number"},"tip_pct":{"default":0.0,"description":"Tip rate, %, applied to the subtotal.","minimum":0,"title":"Tip Pct","type":"number"},"paid_by":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"If one person already paid the whole bill, their name — returns what each other person owes them.","title":"Paid By"}},"required":["subtotal","people"],"title":"even_splitArguments","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/itemized_split":{"post":{"operationId":"itemized_split","summary":"Assigns each item to the people who shared it, computes each person's own subtotal, and allocates tax and","description":"Assigns each item to the people who shared it, computes each person's own subtotal, and allocates tax and\n    tip in proportion to each person's share of the subtotal (not evenly). Use for \"Alice had the $40 steak, Bob\n    and Carol split a $24 appetizer, everyone splits a $12 dessert, tax is 8.5% and tip is 18% — what does\n    everyone owe\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"people":{"description":"Names of everyone splitting the bill.","items":{"type":"string"},"title":"People","type":"array"},"items":{"description":"Each item: {description?: str, price: number, shared_by?: [names] (omit or empty = everyone)}.","items":{"additionalProperties":true,"type":"object"},"title":"Items","type":"array"},"tax_pct":{"default":0.0,"description":"Tax rate, %, applied to the subtotal.","minimum":0,"title":"Tax Pct","type":"number"},"tip_pct":{"default":0.0,"description":"Tip rate, %, applied to the subtotal.","minimum":0,"title":"Tip Pct","type":"number"},"paid_by":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"If one person already paid the whole bill, their name — returns what each other person owes them.","title":"Paid By"}},"required":["people","items"],"title":"itemized_splitArguments","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/simplify_balances":{"post":{"operationId":"simplify_balances","summary":"Reduces a group's net balances to the minimum-transaction settlement plan using the standard greedy","description":"Reduces a group's net balances to the minimum-transaction settlement plan using the standard greedy\n    debt-simplification algorithm (match the biggest creditor against the biggest debtor, repeat) — instead of\n    everyone settling every pairwise debt separately. Use for \"A is owed $40, B is owed $20, C owes $30, D owes\n    $30 — what's the simplest way to settle up\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"balances":{"additionalProperties":{"type":"number"},"description":"Name -> net balance: positive = should receive money, negative = owes money. Must sum to ~0.","title":"Balances","type":"object"}},"required":["balances"],"title":"simplify_balancesArguments","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/splitbill_glossary":{"post":{"operationId":"splitbill_glossary","summary":"Definitions of common bill-splitting terms (even split, itemized split, settle up, net balance, the","description":"Definitions of common bill-splitting terms (even split, itemized split, settle up, net balance, the\n    largest-remainder method, proportional tax/tip allocation, ...). Use for \"what's the largest-remainder\n    method\", \"what does settle up mean\".","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":"splitbill_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}}}}