longbook
v1.50.0Your longbook of bills, subscriptions and expenses, for your AI to read and to suggest changes to.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
next_payment Next payment day
The nearest day any commitment still owes, and every charge landing on it. Charges already marked paid are skipped. A transfer due that day is listed with direction "transfer" and kept out of total, under transfers_total. Amounts are per-currency and never converted, blended, or amortised.
upcoming Upcoming charges
Every charge written for the next N days (default 30), soonest first, with per-currency totals — and which plans run out inside the window. Transfers between the owner's own accounts are listed with direction "transfer" and summed apart, never in total. Amounts are per-currency and never converted, blended, or amortised.
| Parameter | Type | Description |
|---|---|---|
days | integer |
cashflow Monthly cash flow
Monthly totals per currency, summed from the charges written: past months are the record, months ahead are the plan as written, a month with no rows is empty. Spending only — money in and transfers are in no month. Amounts are per-currency and never converted, blended, or amortised.
| Parameter | Type | Description |
|---|---|---|
currency | string | |
months_back | integer | |
months_forward | integer |
spending_by_category Spending by category
Spend per category over a window, summed from the charges written in it — the twelve months from today unless you say otherwise; a past window gives what was spent. Money in and transfers are left out. Amounts are per-currency and never converted, blended, or amortised.
| Parameter | Type | Description |
|---|---|---|
from | string | |
to | string |
spending_by_account Spending by account
Spend per account over a window, summed from the charges written in it — the twelve months from today unless you say otherwise. Money in and transfers are left out. Amounts are per-currency and never converted, blended, or amortised.
| Parameter | Type | Description |
|---|---|---|
from | string | |
to | string |
spending_by_person Spending by person
Spend per person over a window, summed from the charges written in it — the twelve months from today unless you say otherwise. Money in and transfers are left out. Amounts are per-currency and never converted, blended, or amortised.
| Parameter | Type | Description |
|---|---|---|
from | string | |
to | string |
charges List charges
The rows themselves: every charge, or one commitment's, optionally inside a window or only paid / only unpaid — each with its amount, paid state, the day the money moved, what backs it, and its note. A charge behind today reads paid whatever its row says. Transfers are listed with direction "transfer" and summed apart, never in total; money in is read by naming its commitment. This is the ledger; nothing here is computed. Amounts are per-currency and never converted, blended, or amortised.
| Parameter | Type | Description |
|---|---|---|
from | string | |
id | string | |
name | string | |
paid | boolean | |
to | string |
commitments List commitments
Every commitment with its attributes — price now, cycle, status, category, member, account — plus its next unpaid charge, how many charges it has, and how far it is planned. Plans running short are named. `active` is what still lies ahead: a one-time commitment whose charge is behind today or paid is a charge now, counted in settled_one_time and read with charges. direction flags money in ("in") and a movement between the owner's own accounts ("transfer"). Amounts are per-currency and never converted, blended, or amortised.
| Parameter | Type | Description |
|---|---|---|
status | string |
search Search commitments
Finds commitments by name, category, notes, member, or account — case-insensitive, substring match.
| Parameter | Type | Description |
|---|---|---|
query * | string |
add_commitments Add commitments
Adds up to 200 commitments in one call, as one reviewable batch. A recurring row is planned from first_charge for plan_months (24 by default); a one-time row is its single charge on `date`. A statement line that is a charge is a one-time row at its real date and amount with paid: true and basis "statement". Money in — salary, a refund, interest, cashback, a dividend — is a one-time row with direction "in", paid, basis "statement", kept apart from spending. Movements between the owner's own accounts (card bill payments, ATM withdrawals, own transfers) are not charges; a row with direction "…
| Parameter | Type | Description |
|---|---|---|
rows * | array | |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
source | string |
update_commitment Update a commitment
Changes a commitment's attributes, by id or the exact name as the memory holds it — a miss answers with the real names; everything not named stays as it was, and an explicit null clears an optional field. `direction` turns a row into money in ("in") or a transfer between the owner's own accounts ("transfer"), and "out" back into a charge. `amount` is the price now and reaches only unpaid planned charges from `from` (default today); nothing before today is repriced, and a charge priced by hand or proved by a statement stays as it is. `notes` is the commitment's three details that matter, one…
| Parameter | Type | Description |
|---|---|---|
set * | object | |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
id | string | |
name | string | |
source | string |
mark_paid Mark a charge paid
Records that one charge was paid, or takes the mark back with paid: false. The commitment is named by id or the exact name as the memory holds it — a miss answers with the real names. The charge is a row; if no row exists for that day one is written at the commitment's price. `amount` records what left the account when it differed, and `paid_on` the day the money moved when it was not the due date; they change that one row and no other, and a null paid_on or note clears it. Writes are schema-validated and provenance-stamped, and land in the app's Proposals screen where the owner keeps or und…
| Parameter | Type | Description |
|---|---|---|
date * | string | |
amount | number | A number, zero or more, up to 1,000,000,000,000,000. |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
id | string | |
name | string | |
note | A word about this one charge. Null clears. | |
paid | boolean | |
paid_on | The day the money moved, when it was not the due date. Null clears. | |
source | string |
add_charges Add charges
Writes rows into one commitment by date: a statement's months for a commitment that already exists (paid, basis "statement"), or more planned months than the app keeps. The app never grows a plan on its own, so this is how one grows. The commitment is named by id or the exact name as the memory holds it — a miss answers with the real names. A row already there for a day is updated in place, never doubled. An amount left out is the commitment's price. The answer carries balance_note when the account's balance is now older than the newest row written. Writes are schema-validated and provenance…
| Parameter | Type | Description |
|---|---|---|
charges * | array | |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
id | string | |
name | string | |
source | string |
update_charge Change a charge
Changes one charge where it sits — its amount, its day, its paid mark, the day the money moved, its note. The commitment is named by id or the exact name as the memory holds it — a miss answers with the real names, and `date` is the day the row sits on. `set.date` moves it: alone, the row keeps its amount as the owner's fact; with `and_later` every unpaid planned row after it follows a cycle apart and keeps its amount, and paid or hand-priced rows stay. `set.amount` with `and_later` reprices the unpaid planned rows after it too, and the commitment's price with them. A day that already hold…
| Parameter | Type | Description |
|---|---|---|
date * | string | The day the charge sits on. |
set * | object | |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
id | string | |
name | string | |
source | string |
set_planned_count Set the planned count
Sets how many charges stand from today on for a recurring commitment, named by id or the exact name as the memory holds it — a miss answers with the real names — 240 at most. More are written a cycle apart after the last row, at the commitment's price; unpaid planned rows past the count are unwritten; paid rows, hand-set rows and the past stay. A one-time commitment has its one charge and is refused. Writes are schema-validated and provenance-stamped, and land in the app's Proposals screen where the owner keeps or undoes the whole batch. Card numbers, CVVs and credentials are refused by th…
| Parameter | Type | Description |
|---|---|---|
count * | integer | How many charges stand from today on. 240 at most. |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
id | string | |
name | string | |
source | string |
remove_charges Remove charges
Deletes named rows from one commitment, named by id or the exact name as the memory holds it — a miss answers with the real names: a plan that was wrong. A paid row is a fact, so removing one is destructive. Writes are schema-validated and provenance-stamped, and land in the app's Proposals screen where the owner keeps or undoes the whole batch. Card numbers, CVVs and credentials are refused by the validator, which names the row. `source` ("documents/hdfc-2026.pdf", "gmail:18c2…") records where a row came from in the diff.
| Parameter | Type | Description |
|---|---|---|
dates * | array | |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
id | string | |
name | string | |
source | string |
promote_to_recurring Promote one-time commitments to a recurring one
Takes the ids of one-time commitments that are one thing repeating and makes one recurring commitment: their charges move under it exactly as they are — dates, amounts, paid, basis — the one-time rows go, and the plan continues from the step after the latest, never before today, for plan_months (24 by default), or stops at ends_on for a repeat that has ended. Attributes start as the first row's, direction included, so money in stays money in and a transfer stays a transfer; ids that do not share one direction are refused. Name, tag, member, account and notes may be given; notes are the com…
| Parameter | Type | Description |
|---|---|---|
billing_cycle * | string | |
ids * | array | |
account | string | null | |
custom_cycle_days | number | The days between charges of a custom cycle: a whole number, 1 to 36,500. |
ends_on | string | |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
member | string | null | |
name | string | |
notes | string | null | The three details that matter most, one per line, each "Label: value" — for insurance "Policy number: …", "Policy name: …", "Document: documents/…". Only what the source states; read_guide "no… |
plan_months | integer | |
source | string | |
tag | string | null |
reports Read reports
The reports in the vault's reports/ folder, drawn by longbook from the confirmed charges it holds: those dated today or earlier whose basis is anything but "plan". A report may cover any span of days — longbook draws every calendar month on its own; a trip is one whose id starts "trip-"; a span asked for with create_report starts "report-" — and may be narrowed to accounts, members and categories (scope; absent means all). A report still holding unconfirmed passed charges in its currency says so in its own figures — a "Not yet confirmed" stat counts them beside "Total expenses" — so re…
| Parameter | Type | Description |
|---|---|---|
id | string |
list_documents List documents
Lists the files in the vault's documents/ folder — bank and card statements the owner dropped in, and source files referenced by rows. Reads PDF (text-bearing), Excel (.xlsx) and CSV; anything else is listed as unsupported. A file still in iCloud is named so, with its download nudged. Start an import here, then read_guide "importing-statements" for the method.
read_document Read a document
Returns a document's text: PDFs page by page, Excel sheets as CSV lines under sheet headings, CSV as it is. Long files page through offset/next_offset — keep asking until next_offset is null. Only for files in the vault's documents folder; a statement pasted into the chat is already in front of you. The text stays on this machine and in this conversation; never copy an account or card number out of it into the vault — the validator refuses them. Debit lines are charges; credit lines are money in, written with direction "in"; only movements between the owner's own accounts are skipped.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
offset | integer |
leave_insight Leave an insight
Leaves one short note on an app module; the latest note per module shows on that module's own screen. Modules: dashboard.next_payment, dashboard.active_commitments, dashboard.next_30_days, dashboard.this_month, dashboard.by_account, dashboard.by_category, account.<id>, member.<id>. There are no reports.* modules: the Reports screen shows the months longbook drew. A note is a sentence or two. Notes are appended, and the last note per module wins.
| Parameter | Type | Description |
|---|---|---|
module * | string | |
text * | string | |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
cancel_commitment Cancel a commitment
Cancels one commitment, by id or the exact name as the memory holds it — a miss answers with the real names. What was only planned after today is unwritten; what happened stays, so its past charges keep counting. Already-cancelled rows refuse. Writes are schema-validated and provenance-stamped, and land in the app's Proposals screen where the owner keeps or undoes the whole batch. Card numbers, CVVs and credentials are refused by the validator, which names the row. `source` ("documents/hdfc-2026.pdf", "gmail:18c2…") records where a row came from in the diff.
| Parameter | Type | Description |
|---|---|---|
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
id | string | |
name | string | |
source | string |
update_account Update an account
Changes an account's own attributes — its name, its type (`tag` — the same words as the app's Account Type), its `notes`, the person it belongs to (`member`), its balance with the day it was true, and the account it is linked to (`linked_to`) — by id or the exact name as the memory holds it — a miss answers with the real names. `notes` holds what is particular about the account, one detail per line, such as a card's printed name as "Card name: Platinum Reserve"; numbers are refused. card_name and details are longbook's own, and a set sending a non-empty one is refused. Everything not n…
| Parameter | Type | Description |
|---|---|---|
set * | object | |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
id | string | |
name | string | |
source | string |
update_person Update a person
Changes a person's name, email or tag, by id or the exact name as the memory holds it — a miss answers with the real names; everything not named stays as it was, and an explicit null clears the email or the tag. `tag` is their role in the owner's finances — family, household help, landlord — from the member tags. A person carries a name, a tag, an email and linked accounts; details and card_name are longbook's own, and a set sending a non-empty one is refused. Renaming onto a name another person wears is refused rather than merged. Writes are schema-validated and provenance-stamped, and…
| Parameter | Type | Description |
|---|---|---|
set * | object | |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
id | string | |
name | string | |
source | string |
add_person Add a person
Makes a person with what is known — a `tag` for their role in the owner's finances (family, household help, landlord — the library's member tags first) and an `email`. A name another person already wears is refused rather than doubled; update_person changes one that exists. Writes are schema-validated and provenance-stamped, and land in the app's Proposals screen where the owner keeps or undoes the whole batch. Card numbers, CVVs and credentials are refused by the validator, which names the row. `source` ("documents/hdfc-2026.pdf", "gmail:18c2…") records where a row came from in the diff…
| Parameter | Type | Description |
|---|---|---|
name * | string | The name, as the owner said it. Refused when another person already wears it. |
email | string | Where a shared report reaches them. |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
source | string | |
tag | string | Their role in the owner's finances — a member tag: family, household help, landlord. |
add_account Add an account
Makes an account — a card, a bank account, UPI, a wallet, cash — with what is known: its type (`tag`, the app's own words: "credit card", "bank account"), the account it is linked to (`linked_to`, a card to the bank account that pays it, one level), the person it belongs to (`member`, someone the memory holds), its `notes` (one detail per line, such as a card's printed name as "Card name: Platinum Reserve"; numbers are refused) and a `balance` with the day it was true. A name another account already wears is refused rather than doubled; update_account changes one that exists. Writes are sc…
| Parameter | Type | Description |
|---|---|---|
name * | string | The display name — "Visa 9292", the last four digits at most. Refused when another account already wears it. |
balance | number | What the account held on balance_date. |
balance_date | string | The day the balance was true. Left out beside a balance, the day of the write is used. |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
linked_to | string | The account this one is linked to — a card to the bank account that pays it — by name or id. One level only. |
member | string | The person the account belongs to, by name or id as the memory holds them. |
notes | string | What is particular about the account, one detail per line, each "Label: value" — on a card, "Card name: Platinum Reserve", the product printed on it; its number is refused. Rewritten as the account… |
source | string | |
tag | string | The account type, in the app's own words — "credit card", "bank account", "UPI", "wallet", "cash". |
rename_tag Rename a tag
Renames one tag in the vault's own vocabulary — `kind` says which list, commitment, member or account — and carries every row wearing it, the owner's tag groups too. A name another tag of that kind already wears is refused. Writes are schema-validated and provenance-stamped, and land in the app's Proposals screen where the owner keeps or undoes the whole batch. Card numbers, CVVs and credentials are refused by the validator, which names the row. `source` ("documents/hdfc-2026.pdf", "gmail:18c2…") records where a row came from in the diff.
| Parameter | Type | Description |
|---|---|---|
from * | string | The tag as the vault holds it, any casing. |
kind * | string | Which list the tag belongs to. |
to * | string | The new name, in the owner's words. |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
source | string |
delete_tag Delete a tag
Removes one tag from the vault's vocabulary — `kind` says which list — and the rows that wore it are left with no category; nothing else about them changes. A row left without a category shows under "No category" until one is set. Writes are schema-validated and provenance-stamped, and land in the app's Proposals screen where the owner keeps or undoes the whole batch. Card numbers, CVVs and credentials are refused by the validator, which names the row. `source` ("documents/hdfc-2026.pdf", "gmail:18c2…") records where a row came from in the diff.
| Parameter | Type | Description |
|---|---|---|
kind * | string | Which list the tag belongs to. |
name * | string | The tag as the vault holds it, any casing. |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
source | string |
delete_commitment Delete a commitment
Deletes one commitment and every charge it ever had, by id. This is destructive; cancel_commitment keeps what happened instead. Writes are schema-validated and provenance-stamped, and land in the app's Proposals screen where the owner keeps or undoes the whole batch. Card numbers, CVVs and credentials are refused by the validator, which names the row. `source` ("documents/hdfc-2026.pdf", "gmail:18c2…") records where a row came from in the diff.
| Parameter | Type | Description |
|---|---|---|
id * | string | The commitment id, from commitments or search. By id only, never by name. |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
source | string |
create_report Create a report
Asks longbook to draw a report from the ledger over the days and scope named. `title` is its name, `start_date` and `end_date` its first and last day (366 days at most, starting today or earlier), and `accounts`, `members` and `categories` narrow it — left out or empty means all. "No account" names charges billed to no account and "No category" untagged ones; any other name the memory does not hold is refused with the real names, and nothing is ever created. longbook draws the report on its Reports screen the next time the app is open, counting confirmed charges only; nothing waits in Propos…
| Parameter | Type | Description |
|---|---|---|
end_date * | string | The last day covered, YYYY-MM-DD: on or after start_date, 366 days at most counting both. |
start_date * | string | The first day covered, YYYY-MM-DD. Today or earlier. |
title * | string | The report's name, as the owner said it — "Goa", "Q3 household". 1 to 80 characters. |
accounts | The accounts the report covers, or "No account" for charges billed to none, each by name as the memory holds it. Left out or empty: all of them. | |
categories | The categories the report covers, or "No category" for untagged charges, each by name as the memory holds it. Left out or empty: all of them. | |
guide_key | string | The guide_key read_guide returned with the prompt or chapter this write follows. |
members | The people the report covers, each by name as the memory holds it. Left out or empty: all of them. | |
source | string |
read_guide Read the guide
Returns longbook's llms.txt — the contract and working method for an AI using longbook — whole, or one chapter by name. Chapters: what-longbook-is, data-minimization-rule, three-doors, first-run, working-method, prompts, importing-statements, past-is-stored-the-future-is-written, tags, categorise-my-longbook, reorganise-my-longbook, people-and-accounts, documents-folder, document-invoices, notes, reading-reports, month-report, create-a-report, leaving-insights, unattended-runs, daily-email-round, shape, past-is-evidence, invariants, rules-for-anything-that-writes. "importing-statements" co…
| Parameter | Type | Description |
|---|---|---|
section | string |
tags The tag vocabulary
Every tag this vault already uses — with its icon and how many rows wear it — and then longbook's library for the rest, with the owner's own casing. A tag carries no template: a commitment's or an account's own details live in its notes.
accounts List accounts
Every account the memory holds: id, name, type (its tag), institution and last4 when present, belongs_to (the person it belongs to), linked_to (the account it is linked to: a card to the bank account that pays it), balance with balance_date, notes — what is particular about it, one detail per line, a card's name ("Card name: …", the thing to look up for offers) among them — details as stored when it holds any, how many commitments and charges are billed to it, and its next unpaid charge.
people List people
Every person the memory holds: id, name, tag (their role in the owner's finances — family, household help, landlord), email, the accounts that belong to them, details as stored when they hold any, how many commitments and charges are for them, and their next unpaid charge.
whoami Who am I here
Answers who this connection belongs to, what it may do (read, or read and propose changes), how much of its rate allowance is left, whether a hosted copy exists and when it was last pushed, how many proposals are waiting for the owner's app, which ones it could not apply and why (failed_to_apply), and where the schemas live. One call, so it also shows whether the connection can read and write.