{"openapi":"3.1.0","info":{"title":"BanksMCP API","version":"2","description":"Read your own bank accounts: synced transactions, cash flow, recurring payments, receipt matching and read-only SQL. Every operation is also an MCP tool at `/mcp` with the same name and schema. Authenticate with `Authorization: Bearer <API key or OAuth token>`. Amounts are in major units; negative means money out."},"servers":[{"url":"https://banksmcp.com"}],"tags":[{"name":"objects","description":"Accounts and transactions as synced from the bank. Pass `id` to get one."},{"name":"analytics","description":"Answers computed over the synced data: cash flow, recurring payments, receipt matching, currency conversion and read-only SQL."},{"name":"actions","description":"Operations that change state. Nothing here can move money."},{"name":"platform","description":"The user's plan, usage and the links to manage the account."}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}},"schemas":{"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_input","not_found","bank","exchange_rates","rate_limited","quota_exceeded","unknown_operation","unauthorized","internal"]},"message":{"type":"string"}}}}}}},"security":[{"bearer":[]}],"paths":{"/api/v1/get_accounts":{"post":{"operationId":"get_accounts","summary":"Get accounts","description":"Connected bank accounts with IBAN, holder, balance, the state of their bank connection (active, syncing, renew = new TAN needed, error) and when they were last synced, plus totals per currency, how many transactions are stored over which period, and `data_age`. `id` (account id or IBAN) or `access_id` narrow the list. Start here.","tags":["objects"],"x-mcp-read-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"id":{"description":"One account by its id or IBAN (spaces ignored).","type":["string","null"]},"access_id":{"description":"Only the accounts of one bank connection.","type":["string","null"]},"freshness":{"description":"`cached` (default): answer from stored data. `recent`: sync first when the last sync is older than `max_age_minutes`. `live`: ask the bank for new data now, then answer (slow; a few per day).","oneOf":[{"description":"What is stored, however old (fast; every answer says how old).","type":"string","const":"cached"},{"description":"Sync from the provider first when the last sync is older than\n`max_age_minutes` (default 60). Blocks for a few seconds.","type":"string","const":"recent"},{"description":"Ask the bank for new data now, wait for it, then answer. Slowest;\nbanks allow only a few such requests a day without the user present.","type":"string","const":"live"}],"default":"cached"},"max_age_minutes":{"description":"For `recent`: how old the stored data may be (default 60).","type":["integer","null"],"format":"int64"}},"type":"object","description":"`get_accounts`: without filters every account; `id` narrows to one."}}}},"responses":{"200":{"description":"The answer, wrapped in `data`. With `Accept: text/toon` the bare answer comes as TOON instead.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"required":["accounts","connections","totals","transactions","data_age"],"properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"access_id":{"description":"The bank connection this account belongs to (`sync_accounts` takes it as `id`).","type":"string"},"iban":{"type":["string","null"]},"name":{"type":["string","null"]},"bank":{"type":["string","null"]},"holder":{"type":["string","null"]},"currency":{"type":"string"},"balance":{"type":["number","null"],"format":"double"},"balance_date":{"type":["string","null"],"format":"date"},"status":{"description":"State of the bank connection: `pending`, `active`, `syncing`, `renew` (new TAN needed) or `error`.","type":"string"},"problem":{"type":["string","null"]},"synced_at":{"type":["string","null"]},"bank_data_at":{"type":["string","null"]},"consented_at":{"type":["string","null"]}},"required":["id","access_id","currency","status"]}},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"bank":{"type":["string","null"]},"status":{"type":"string"},"problem":{"type":["string","null"]},"synced_at":{"type":["string","null"]},"bank_data_at":{"type":["string","null"]},"consented_at":{"type":["string","null"]}},"required":["id","status"]}},"totals":{"description":"Sum of the balances per currency.","type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"balance":{"type":"number","format":"double"}},"required":["currency","balance"]}},"transactions":{"description":"Stored transactions over all accounts.","type":"integer","format":"int64"},"first_booking":{"type":["string","null"]},"last_booking":{"type":["string","null"]},"data_age":{"type":"object","properties":{"synced_at":{"type":["string","null"]},"bank_data_at":{"type":["string","null"]},"action":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}},"required":["action","notes"]}},"type":"object"}}}},"text/toon":{"schema":{"type":"string"}}}},"400":{"description":"invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"monthly quota of the plan used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"the bank or the rate source failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_transactions":{"post":{"operationId":"get_transactions","summary":"Get transactions","description":"Synced transactions, newest first. `id` returns one transaction. Otherwise combine full text (`text`: counterparty, purpose, IBAN, references; every word must match, prefixes and umlaut-free spelling work), fuzzy `counterparty`, `reference` (invoice/mandate/end-to-end numbers, separators ignored), `iban`, a date range, `direction` and `amount`. `amount` takes `approx` with `tolerance_pct`/`tolerance_abs` or `min`/`max`, optionally in another `currency`: then each booking is compared at the ECB rate of its day (e.g. {\"approx\": 90, \"currency\": \"USD\"} finds the ~83 EUR card payment; foreign currencies get 3 % slack by default for card fees). Amounts are absolute unless `signed`. Returns `total` matches and one page (`limit` default 50, `offset`, `has_more`), and `data_age`.","tags":["objects"],"x-mcp-read-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Filter to a single transaction by its id (returns full transaction details).","type":["string","null"]},"text":{"description":"Full text over counterparty, purpose, booking text, IBAN and\nreferences; every word must appear, prefixes match, case and\numlauts do not matter (`muller` finds `Müller`).","type":["string","null"]},"counterparty":{"description":"Counterparty name, fuzzy (legal forms ignored).","type":["string","null"]},"iban":{"description":"Counterparty IBAN.","type":["string","null"]},"reference":{"description":"Invoice, customer, mandate or end-to-end reference, separators ignored.","type":["string","null"]},"from":{"description":"First booking day (inclusive).","type":["string","null"],"format":"date"},"to":{"description":"Last booking day (inclusive).","type":["string","null"],"format":"date"},"direction":{"oneOf":[{"type":"string","enum":["any"]},{"description":"Money received.","type":"string","const":"in"},{"description":"Money paid.","type":"string","const":"out"}],"default":"any"},"amount":{"description":"An amount condition. Without `currency` the amounts are in the\naccount's currency (EUR). With another currency each transaction is\ncompared at the ECB reference rate of its booking day.","type":["object","null"],"properties":{"approx":{"description":"About this much (use `tolerance_pct` / `tolerance_abs` for the slack).","type":["number","null"],"format":"double"},"min":{"type":["number","null"],"format":"double"},"max":{"type":["number","null"],"format":"double"},"tolerance_pct":{"description":"Allowed deviation from `approx` in percent. Default 0, or 3 when\n`currency` is not the account's (card exchange fees).","type":["number","null"],"format":"double"},"tolerance_abs":{"description":"Allowed deviation from `approx` in units of `currency`.","type":["number","null"],"format":"double"},"currency":{"description":"ISO 4217, e.g. `USD`.","type":["string","null"]},"signed":{"description":"Compare signed amounts instead of absolute ones (default false: 90 matches -90).","type":"boolean","default":false}}},"accounts":{"description":"Account ids or IBANs; default all.","type":["array","null"],"items":{"type":"string"}},"sort":{"oneOf":[{"type":"string","enum":["date_desc","date_asc","amount_desc","amount_asc"]},{"description":"Full-text relevance (only with `text`), then date.","type":"string","const":"relevance"}],"default":"date_desc"},"limit":{"description":"Default 50, at most 500.","type":["integer","null"],"format":"uint32","minimum":0},"offset":{"type":["integer","null"],"format":"uint32","minimum":0},"freshness":{"description":"`cached` (default): answer from stored data. `recent`: sync first when the last sync is older than `max_age_minutes`. `live`: ask the bank for new data now, then answer (slow; a few per day).","oneOf":[{"description":"What is stored, however old (fast; every answer says how old).","type":"string","const":"cached"},{"description":"Sync from the provider first when the last sync is older than\n`max_age_minutes` (default 60). Blocks for a few seconds.","type":"string","const":"recent"},{"description":"Ask the bank for new data now, wait for it, then answer. Slowest;\nbanks allow only a few such requests a day without the user present.","type":"string","const":"live"}],"default":"cached"},"max_age_minutes":{"description":"For `recent`: how old the stored data may be (default 60).","type":["integer","null"],"format":"int64"}},"type":"object"}}}},"responses":{"200":{"description":"The answer, wrapped in `data`. With `Accept: text/toon` the bare answer comes as TOON instead.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"required":["total","returned","has_more","transactions","data_age"],"properties":{"total":{"type":"integer","format":"uint64","minimum":0},"returned":{"type":"integer","format":"uint","minimum":0},"has_more":{"description":"More matches after this page: raise `offset`.","type":"boolean"},"transactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"account":{"type":"string"},"date":{"type":"string","format":"date"},"value_date":{"type":["string","null"],"format":"date"},"amount":{"description":"Negative: money out.","type":"number","format":"double"},"currency":{"type":"string"},"counterparty":{"type":["string","null"]},"counterparty_iban":{"type":["string","null"]},"purpose":{"type":["string","null"]},"booking_text":{"type":["string","null"]},"end_to_end_id":{"type":["string","null"]},"mandate_id":{"type":["string","null"]},"status":{"type":"string","enum":["booked","pending"]}},"required":["id","account","date","amount","currency","status"]}},"data_age":{"type":"object","properties":{"synced_at":{"type":["string","null"]},"bank_data_at":{"type":["string","null"]},"action":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}},"required":["action","notes"]}},"type":"object"}}}},"text/toon":{"schema":{"type":"string"}}}},"400":{"description":"invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"monthly quota of the plan used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"the bank or the rate source failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_cashflow":{"post":{"operationId":"get_cashflow","summary":"Get cash flow","description":"Income, expenses and net per month for a period (default: the last six months), with the largest payers and payees.","tags":["analytics"],"x-mcp-read-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"from":{"description":"First booking day; default six months ago.","type":["string","null"],"format":"date"},"to":{"description":"Last booking day; default today.","type":["string","null"],"format":"date"},"accounts":{"description":"Account ids or IBANs; default all.","type":["array","null"],"items":{"type":"string"}},"top":{"description":"How many largest payers and payees (default 10).","type":["integer","null"],"format":"uint32","minimum":0},"freshness":{"description":"`cached` (default): answer from stored data. `recent`: sync first when the last sync is older than `max_age_minutes`. `live`: ask the bank for new data now, then answer (slow; a few per day).","oneOf":[{"description":"What is stored, however old (fast; every answer says how old).","type":"string","const":"cached"},{"description":"Sync from the provider first when the last sync is older than\n`max_age_minutes` (default 60). Blocks for a few seconds.","type":"string","const":"recent"},{"description":"Ask the bank for new data now, wait for it, then answer. Slowest;\nbanks allow only a few such requests a day without the user present.","type":"string","const":"live"}],"default":"cached"},"max_age_minutes":{"description":"For `recent`: how old the stored data may be (default 60).","type":["integer","null"],"format":"int64"}},"type":"object"}}}},"responses":{"200":{"description":"The answer, wrapped in `data`. With `Accept: text/toon` the bare answer comes as TOON instead.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"required":["from","to","income","expenses","net","months","top_income","top_expenses","data_age"],"properties":{"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"income":{"type":"number","format":"double"},"expenses":{"type":"number","format":"double"},"net":{"type":"number","format":"double"},"months":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"income":{"type":"number","format":"double"},"expenses":{"type":"number","format":"double"},"net":{"type":"number","format":"double"},"bookings":{"type":"integer","format":"uint32","minimum":0}},"required":["month","income","expenses","net","bookings"]}},"top_income":{"type":"array","items":{"type":"object","properties":{"counterparty":{"type":"string"},"total":{"type":"number","format":"double"},"bookings":{"type":"integer","format":"uint32","minimum":0}},"required":["counterparty","total","bookings"]}},"top_expenses":{"type":"array","items":{"type":"object","properties":{"counterparty":{"type":"string"},"total":{"type":"number","format":"double"},"bookings":{"type":"integer","format":"uint32","minimum":0}},"required":["counterparty","total","bookings"]}},"data_age":{"type":"object","properties":{"synced_at":{"type":["string","null"]},"bank_data_at":{"type":["string","null"]},"action":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}},"required":["action","notes"]}},"type":"object"}}}},"text/toon":{"schema":{"type":"string"}}}},"400":{"description":"invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"monthly quota of the plan used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"the bank or the rate source failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_recurring":{"post":{"operationId":"get_recurring","summary":"Get recurring payments","description":"Regular payments detected from the last 13 months: subscriptions, rent, salaries, loans, retainers. Each with cadence, typical amount, monthly equivalent, last and next expected date.","tags":["analytics"],"x-mcp-read-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"direction":{"description":"`out` (default): what we pay regularly. `in`: what we receive. `any`: both.","anyOf":[{"oneOf":[{"type":"string","enum":["any"]},{"description":"Money received.","type":"string","const":"in"},{"description":"Money paid.","type":"string","const":"out"}]},{"type":"null"}]},"accounts":{"type":["array","null"],"items":{"type":"string"}},"freshness":{"description":"`cached` (default): answer from stored data. `recent`: sync first when the last sync is older than `max_age_minutes`. `live`: ask the bank for new data now, then answer (slow; a few per day).","oneOf":[{"description":"What is stored, however old (fast; every answer says how old).","type":"string","const":"cached"},{"description":"Sync from the provider first when the last sync is older than\n`max_age_minutes` (default 60). Blocks for a few seconds.","type":"string","const":"recent"},{"description":"Ask the bank for new data now, wait for it, then answer. Slowest;\nbanks allow only a few such requests a day without the user present.","type":"string","const":"live"}],"default":"cached"},"max_age_minutes":{"description":"For `recent`: how old the stored data may be (default 60).","type":["integer","null"],"format":"int64"}},"type":"object"}}}},"responses":{"200":{"description":"The answer, wrapped in `data`. With `Accept: text/toon` the bare answer comes as TOON instead.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"required":["recurring","monthly_total","data_age"],"properties":{"recurring":{"type":"array","items":{"type":"object","properties":{"counterparty":{"type":"string"},"cadence":{"type":"string","enum":["weekly","monthly","quarterly","yearly"]},"typical_amount":{"description":"Signed: negative is paid.","type":"number","format":"double"},"per_month":{"type":"number","format":"double"},"occurrences":{"type":"integer","format":"uint32","minimum":0},"last":{"type":"string","format":"date"},"next_expected":{"type":"string","format":"date"},"account":{"type":"string"}},"required":["counterparty","cadence","typical_amount","per_month","occurrences","last","next_expected","account"]}},"monthly_total":{"description":"Sum of `per_month` over all entries.","type":"number","format":"double"},"data_age":{"type":"object","properties":{"synced_at":{"type":["string","null"]},"bank_data_at":{"type":["string","null"]},"action":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}},"required":["action","notes"]}},"type":"object"}}}},"text/toon":{"schema":{"type":"string"}}}},"400":{"description":"invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"monthly quota of the plan used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"the bank or the rate source failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/match_receipt":{"post":{"operationId":"match_receipt","summary":"Match a receipt to transactions","description":"Given what a receipt or invoice says (amount and currency; optionally date, due date, vendor, invoice number, IBAN), returns the transactions most likely to have paid it, each with a probability and the evidence (amount incl. FX at the booking day's ECB rate, date, name similarity, invoice number in the remittance text, IBAN). Read the receipt yourself and pass the fields.","tags":["analytics"],"x-mcp-read-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"required":["amount"],"properties":{"amount":{"description":"Total, positive, in `currency`.","type":"number","format":"double"},"currency":{"description":"ISO 4217; default EUR.","type":["string","null"]},"date":{"description":"Invoice or purchase date.","type":["string","null"],"format":"date"},"due_date":{"description":"Payment due date, if printed.","type":["string","null"],"format":"date"},"vendor":{"description":"Who issued it (shop, supplier, customer).","type":["string","null"]},"invoice_number":{"type":["string","null"]},"iban":{"description":"IBAN printed on the invoice.","type":["string","null"]},"direction":{"description":"`out` (default): we paid it. `in`: a customer paid us.","oneOf":[{"type":"string","enum":["any"]},{"description":"Money received.","type":"string","const":"in"},{"description":"Money paid.","type":"string","const":"out"}],"default":"out"},"limit":{"description":"Candidates to return (default 5, at most 20).","type":["integer","null"],"format":"uint32","minimum":0},"freshness":{"description":"`cached` (default): answer from stored data. `recent`: sync first when the last sync is older than `max_age_minutes`. `live`: ask the bank for new data now, then answer (slow; a few per day).","oneOf":[{"description":"What is stored, however old (fast; every answer says how old).","type":"string","const":"cached"},{"description":"Sync from the provider first when the last sync is older than\n`max_age_minutes` (default 60). Blocks for a few seconds.","type":"string","const":"recent"},{"description":"Ask the bank for new data now, wait for it, then answer. Slowest;\nbanks allow only a few such requests a day without the user present.","type":"string","const":"live"}],"default":"cached"},"max_age_minutes":{"description":"For `recent`: how old the stored data may be (default 60).","type":["integer","null"],"format":"int64"}},"description":"What is known about a receipt or invoice. Fill in what you have; the\namount is the only required field.","type":"object"}}}},"responses":{"200":{"description":"The answer, wrapped in `data`. With `Accept: text/toon` the bare answer comes as TOON instead.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"required":["candidates","data_age"],"properties":{"candidates":{"description":"Best first.","type":"array","items":{"type":"object","properties":{"probability":{"description":"0..1: how likely this transaction paid the receipt.","type":"number","format":"double"},"transaction":{"type":"object","properties":{"id":{"type":"string"},"account":{"type":"string"},"date":{"type":"string","format":"date"},"value_date":{"type":["string","null"],"format":"date"},"amount":{"description":"Negative: money out.","type":"number","format":"double"},"currency":{"type":"string"},"counterparty":{"type":["string","null"]},"counterparty_iban":{"type":["string","null"]},"purpose":{"type":["string","null"]},"booking_text":{"type":["string","null"]},"end_to_end_id":{"type":["string","null"]},"mandate_id":{"type":["string","null"]},"status":{"type":"string","enum":["booked","pending"]}},"required":["id","account","date","amount","currency","status"]},"evidence":{"type":"array","items":{"type":"string"}}},"required":["probability","transaction","evidence"]}},"data_age":{"type":"object","properties":{"synced_at":{"type":["string","null"]},"bank_data_at":{"type":["string","null"]},"action":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}},"required":["action","notes"]}},"type":"object"}}}},"text/toon":{"schema":{"type":"string"}}}},"400":{"description":"invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"monthly quota of the plan used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"the bank or the rate source failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/convert_currency":{"post":{"operationId":"convert_currency","summary":"Convert currency","description":"Converts an amount at the ECB euro reference rate of a day (default: latest), e.g. to know what a USD invoice was in EUR.","tags":["analytics"],"x-mcp-read-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"required":["amount","from","to"],"properties":{"amount":{"type":"number","format":"double"},"from":{"description":"ISO 4217 of `amount`.","type":"string"},"to":{"description":"ISO 4217 to convert to.","type":"string"},"date":{"description":"Day of the ECB reference rate; default the latest.","type":["string","null"],"format":"date"}},"type":"object"}}}},"responses":{"200":{"description":"The answer, wrapped in `data`. With `Accept: text/toon` the bare answer comes as TOON instead.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"required":["amount","from","to","result","rate","rate_date","source"],"properties":{"amount":{"type":"number","format":"double"},"from":{"type":"string"},"to":{"type":"string"},"result":{"type":"number","format":"double"},"rate":{"type":"number","format":"double"},"rate_date":{"type":"string","format":"date"},"source":{"type":"string"}},"type":"object"}}}},"text/toon":{"schema":{"type":"string"}}}},"400":{"description":"invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"monthly quota of the plan used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"the bank or the rate source failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/query_sql":{"post":{"operationId":"query_sql","summary":"Query with SQL","description":"One read-only SQLite query over this user's own data, for anything the other tools do not cover (grouping, ratios, custom periods). The flavor: exactly one SELECT (or non-recursive WITH … SELECT), no comments, no PRAGMA/ATTACH/writes, at most 6 table references, no blob/extension/runtime functions, at most 1000 rows. Tables:\ntransactions(row_id, id, account_id, booked_on 'YYYY-MM-DD', value_on, amount REAL signed (negative = out), amount_minor INTEGER cents, currency, counterparty, counterparty_iban, purpose, booking_text, end_to_end_id, mandate_id, creditor_id, status, first_seen_at)\naccounts(id, access_id, iban, name, kind, bank, holder, currency, balance REAL, balance_date, updated_at)\nfx_rates(currency, day, per_eur)  -- ECB: units per 1 EUR, filled when a currency was used\ntx_fts(text)  -- FTS5, rowid = transactions.row_id; e.g. JOIN tx_fts ON tx_fts.rowid = t.row_id WHERE tx_fts MATCH 'muller*'\nDates are text; use strftime/substr.","tags":["analytics"],"x-mcp-read-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"required":["query"],"properties":{"query":{"description":"One read-only SQLite SELECT (or WITH … SELECT) over the published tables; at most 1000 rows come back.","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"The answer, wrapped in `data`. With `Accept: text/toon` the bare answer comes as TOON instead.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"required":["columns","rows","row_count"],"properties":{"columns":{"type":"array","items":{"type":"string"}},"rows":{"description":"One array per row, in `columns` order.","type":"array","items":{"type":"array","items":true}},"row_count":{"type":"integer","format":"uint","minimum":0}},"type":"object"}}}},"text/toon":{"schema":{"type":"string"}}}},"400":{"description":"invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"monthly quota of the plan used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"the bank or the rate source failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/sync_accounts":{"post":{"operationId":"sync_accounts","summary":"Sync accounts","description":"Reads the latest data from the bank into the store now: every connection, or only the one of `id` (account id, IBAN or connection id). With `live`, first asks the bank itself for new bookings (banks allow only a few such requests per day without the user present). The read tools also take `freshness` instead.","tags":["actions"],"x-mcp-read-only":false,"requestBody":{"required":false,"content":{"application/json":{"schema":{"properties":{"id":{"description":"An account id, IBAN or bank connection id; omitted: every connection.","type":["string","null"]},"live":{"description":"`true`: ask the bank for new data first (counts against the bank's few daily requests). `false` (default): read what the provider already has.","type":"boolean","default":false}},"type":"object"}}}},"responses":{"200":{"description":"The answer, wrapped in `data`. With `Accept: text/toon` the bare answer comes as TOON instead.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"required":["synced","transactions","data_age"],"properties":{"synced":{"description":"The bank connections that were synced.","type":"array","items":{"type":"string"}},"transactions":{"description":"Stored transactions after the sync.","type":"integer","format":"int64"},"data_age":{"type":"object","properties":{"synced_at":{"type":["string","null"]},"bank_data_at":{"type":["string","null"]},"action":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}},"required":["action","notes"]}},"type":"object"}}}},"text/toon":{"schema":{"type":"string"}}}},"400":{"description":"invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"monthly quota of the plan used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"the bank or the rate source failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_workspace":{"post":{"operationId":"get_workspace","summary":"Get workspace","description":"The user's plan, how many tool calls are used this month and the limits, plus the links to save the account (guests), to connect a bank or to ask for more. Call it when another tool reports a limit.","tags":["platform"],"x-mcp-read-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"The answer, wrapped in `data`. With `Accept: text/toon` the bare answer comes as TOON instead.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"required":["plan","bank_connected","usage","dashboard_url","note"],"properties":{"plan":{"description":"`guest`, `free`, `pro` or `unlimited`.","type":"string"},"email":{"type":["string","null"]},"bank_connected":{"type":"boolean"},"usage":{"type":"object","properties":{"this_month":{"description":"Tool calls this month.","type":"integer","format":"uint32","minimum":0},"month_limit":{"description":"`null`: no monthly limit.","type":["integer","null"],"format":"uint32","minimum":0},"resets_on":{"type":"string"},"per_minute_limit":{"type":"integer","format":"uint32","minimum":0},"per_day_limit":{"type":"integer","format":"uint32","minimum":0}},"required":["this_month","resets_on","per_minute_limit","per_day_limit"]},"dashboard_url":{"type":"string"},"connect_bank_url":{"type":["string","null"]},"save_account_url":{"type":["string","null"]},"upgrade_url":{"type":["string","null"]},"note":{"type":"string"}},"description":"Plan, usage and the links a user needs; answered by the platform.","type":"object"}}}},"text/toon":{"schema":{"type":"string"}}}},"400":{"description":"invalid input","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"missing or invalid credential","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"monthly quota of the plan used up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"the bank or the rate source failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}