{"openapi":"3.1.0","info":{"title":"Split Cost API","version":"0.1.0","description":"A pure-compute group-travel cost-splitting engine: cent-exact equal/percentage/weighted/itemized splits, a paid-vs-owed ledger, and a real debt-simplification algorithm that minimizes the number of payments needed to settle a group up. Nothing looked up or stored -- every result is computed locally 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://splitcost.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"hr@unifydynamics.com","url":"https://connectorbay.com/splitcost/docs"},"termsOfService":"https://connectorbay.com/splitcost/terms"},"servers":[{"url":"https://splitcost.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/splitcost/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/equal_split":{"post":{"operationId":"equal_split","summary":"Splits a total evenly among named people, cent-exact via largest-remainder rounding (shares always sum","description":"Splits a total evenly among named people, cent-exact via largest-remainder rounding (shares always sum\n    exactly to the total, with any odd cent given to the first people alphabetically-processed). Use for \"split\n    $340 three ways between Alice, Bob and Carol\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"total_amount":{"description":"The total amount to split.","minimum":0,"title":"Total Amount","type":"number"},"people":{"description":"Names of everyone splitting the total.","items":{"type":"string"},"minItems":1,"title":"People","type":"array"}},"required":["total_amount","people"],"title":"equal_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/percentage_split":{"post":{"operationId":"percentage_split","summary":"Splits a total by named percentages (which must sum to 100), cent-exact. Use for \"split the $500 hotel","description":"Splits a total by named percentages (which must sum to 100), cent-exact. Use for \"split the $500 hotel\n    60/40 between Alice and Bob\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"total_amount":{"description":"The total amount to split.","minimum":0,"title":"Total Amount","type":"number"},"percentages":{"additionalProperties":{"type":"number"},"description":"Name -> percentage share, must sum to 100.","title":"Percentages","type":"object"}},"required":["total_amount","percentages"],"title":"percentage_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/weighted_split":{"post":{"operationId":"weighted_split","summary":"Splits a total in proportion to arbitrary weights (nights stayed, mileage driven, headcount per family --","description":"Splits a total in proportion to arbitrary weights (nights stayed, mileage driven, headcount per family --\n    whatever fairness basis fits), cent-exact. Use for \"split the $900 cabin by nights stayed: Alice 5 nights, Bob\n    3 nights, Carol 2 nights\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"total_amount":{"description":"The total amount to split.","minimum":0,"title":"Total Amount","type":"number"},"weights":{"additionalProperties":{"type":"number"},"description":"Name -> weight (e.g. nights stayed, usage), any positive numbers.","title":"Weights","type":"object"}},"required":["total_amount","weights"],"title":"weighted_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":"Splits a bill item by item, where each item is divided only among the people who actually shared it, then","description":"Splits a bill item by item, where each item is divided only among the people who actually shared it, then\n    aggregates each person's total owed across all items. Use for \"split a $150 dinner where only 3 of the 5 of us\n    had dessert\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"items":{"description":"Line items, each {\"description\": str (optional), \"amount\": number, \"participants\": [names]}.","items":{"additionalProperties":true,"type":"object"},"title":"Items","type":"array"}},"required":["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/expense_summary_by_person":{"post":{"operationId":"expense_summary_by_person","summary":"Computes what each person actually paid vs their equal share owed, across a list of group expenses (each","description":"Computes what each person actually paid vs their equal share owed, across a list of group expenses (each\n    expense split evenly among its own participants). Use for \"Alice paid $200 for the rental house, Bob paid $80 for\n    gas, we all shared both equally -- what did everyone pay vs owe\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"expenses":{"description":"Expenses, each {\"payer\": name, \"amount\": number, \"participants\": [names]}.","items":{"additionalProperties":true,"type":"object"},"title":"Expenses","type":"array"}},"required":["expenses"],"title":"expense_summary_by_personArguments","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/compute_balances":{"post":{"operationId":"compute_balances","summary":"Nets explicit paid/owed totals per person into a balance -- positive means the group owes them, negative","description":"Nets explicit paid/owed totals per person into a balance -- positive means the group owes them, negative\n    means they owe the group. Use when you already have paid/owed totals and just want the net.","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"paid":{"additionalProperties":{"type":"number"},"description":"Name -> total amount that person paid.","title":"Paid","type":"object"},"owed":{"additionalProperties":{"type":"number"},"description":"Name -> total amount that person owed (their share of everything).","title":"Owed","type":"object"}},"required":["paid","owed"],"title":"compute_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/settle_up":{"post":{"operationId":"settle_up","summary":"Runs a greedy debt-simplification algorithm on a set of net balances, computing a minimal-ish set of direct","description":"Runs a greedy debt-simplification algorithm on a set of net balances, computing a minimal-ish set of direct\n    payments (largest creditor paid by largest debtor, repeated) so the group doesn't have to settle every expense\n    individually. Use for \"minimize the number of payments to settle up our group trip\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"balances":{"additionalProperties":{"type":"number"},"description":"Name -> net balance (positive = owed money, negative = owes money); must sum to ~0.","title":"Balances","type":"object"}},"required":["balances"],"title":"settle_upArguments","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/verify_balances":{"post":{"operationId":"verify_balances","summary":"Sanity-checks that a set of balances nets to zero (a prerequisite for settle_up) and explains likely causes","description":"Sanity-checks that a set of balances nets to zero (a prerequisite for settle_up) and explains likely causes\n    if it doesn't. Use for \"do these balances actually add up before I try to settle them\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"balances":{"additionalProperties":{"type":"number"},"description":"Name -> net balance to sanity-check.","title":"Balances","type":"object"}},"required":["balances"],"title":"verify_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/full_trip_settlement":{"post":{"operationId":"full_trip_settlement","summary":"Runs the whole pipeline end to end: paid-vs-owed summary, net balances, and the minimized settle-up","description":"Runs the whole pipeline end to end: paid-vs-owed summary, net balances, and the minimized settle-up\n    transaction list, from a single raw expense list. Use for \"here's everything we spent on the trip, who owes\n    whom and how should we settle up\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"expenses":{"description":"Expenses, each {\"payer\": name, \"amount\": number, \"participants\": [names]}.","items":{"additionalProperties":true,"type":"object"},"title":"Expenses","type":"array"}},"required":["expenses"],"title":"full_trip_settlementArguments","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/splitcost_glossary":{"post":{"operationId":"splitcost_glossary","summary":"Definitions of cost-splitting terms -- net balance, debt simplification, largest-remainder apportionment,","description":"Definitions of cost-splitting terms -- net balance, debt simplification, largest-remainder apportionment,\n    itemized split, settle-up transaction. Use for \"what does debt simplification 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":"splitcost_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}}}}