Docs menu

Reference

MCP tool reference

Every tool LedgerOne's MCP server offers AI assistants, with its parameters and whether it reads, writes or is destructive.

Every tool acts as the signed-in person, with their role's permissions; records from other businesses come back as not found. Amounts are in the business's currency; dates are YYYY-MM-DD. Start with get_context to learn who you are and which sections are on.

LabelMeaning
ReadOnly reads. Safe to allow without asking.
WriteAdds or changes records.
DestructiveDeletes, finalises or sends email. Irreversible ones also need confirm: true.

Start here

Who is connected, and the categories and accounts other tools refer to.

get_contextreadWho am I

The signed-in person, their business (name, currency, tax year), role, permissions and which sections are switched on. Call this first.

No parameters.

list_accountsreadList accounts

The business's chart of accounts (income, expense, asset, liability, equity), with ids used by other tools.

ParameterTypeDescription
typeasset | liability | equity | income | expense
include_inactiveboolean
list_expense_categoriesreadList expense categories

Categories an expense can be filed under (expense accounts and long-term asset accounts), most used first.

No parameters.

save_accountwriteCreate or rename an account

Owner only. Creates a category/account (code, name, group) or renames an existing one and sets whether it is tax-deductible.

ParameterTypeDescription
ididExisting account to rename / change; omit to create one.
codetextNew accounts only: a unique code, e.g. 6200.
namerequiredtext
groupoperating | cost_of_sales | revenue | other_incomeNew accounts only: operating/cost_of_sales are expense accounts; revenue/other_income are income.
tax_deductibleboolean

Expenses

Spending, with receipts. Deleting moves to the Deleted view first.

list_expensesreadList expenses

Expenses with filters (dates, category, cash/bank, project, missing receipt, text search). Newest first.

ParameterTypeDescription
fromdateStart date (inclusive), YYYY-MM-DD.
todateEnd date (inclusive), YYYY-MM-DD.
category_ididOnly this category (chart of accounts id).
payment_methodcash | bank
project_idid
missing_receiptbooleanOnly expenses without any receipt attached.
searchtextMatches description, vendor and note.
deletedbooleanList deleted (restorable) expenses instead.
limitnumberMaximum rows to return (1-500).
get_expensereadGet an expense

One expense with its receipts (short-lived download links), payslip/voucher details and edit history.

ParameterTypeDescription
idrequiredid
create_expensewriteSubmit an expense

Records an expense (amount, category, date, cash/bank, description, vendor, project, note). Dates in a finalised period are refused.

ParameterTypeDescription
amountrequirednumber
account_idrequiredidCategory: an id from list_expense_categories.
expense_daterequireddateWhen it was paid (not in the future).
payment_methodrequiredcash | bank
descriptiontext
vendortextWho was paid.
project_ididTag the cost to a project.
notetext
update_expensewriteEdit an expense

Changes fields of an expense; omitted fields keep their current value. The edit is kept in the expense's history.

ParameterTypeDescription
idrequiredid
amountnumber
account_ididCategory: an id from list_expense_categories.
expense_datedateWhen it was paid (not in the future).
payment_methodcash | bank
descriptiontext
vendortextWho was paid.
project_ididTag the cost to a project.
notetext
suggest_expense_categoryreadSuggest a category

Suggests the category for an expense description, from the business's own history and common rules.

ParameterTypeDescription
textrequiredtextWhat was bought / who was paid.
recategorize_expenseswriteRecategorise expenses

Moves several expenses to another category.

ParameterTypeDescription
idsrequiredlist of id
account_idrequiredid
add_expense_receiptwriteAttach a receipt

Uploads a receipt (JPEG, PNG, WebP, HEIC or PDF, base64, up to ~6 MB) to an expense.

ParameterTypeDescription
expense_idrequiredid
file_namerequiredtext
content_typerequiredimage/jpeg | image/png | image/webp | image/heic | application/pdf
content_base64requiredtextThe file's bytes, base64-encoded (max ~6 MB).
remove_expense_receiptdestructiveRemove a receipt

Deletes a receipt file from an expense. Not allowed for expenses in a finalised period.

ParameterTypeDescription
attachment_idrequiredid
delete_expensesdestructiveDelete expenses

Owner only. Moves expenses to Deleted (soft delete: history kept, can be restored with restore_expenses). Expenses in a finalised period are skipped.

ParameterTypeDescription
idsrequiredlist of id
restore_expenseswriteRestore expenses

Owner only. Restores deleted expenses.

ParameterTypeDescription
idsrequiredlist of id
purge_expensesdestructiveErase expenses permanently

Owner only. IRREVERSIBLY erases expenses that are already deleted, with their history and receipt files. Requires confirm: true.

ParameterTypeDescription
idsrequiredlist of id
confirmrequiredtrueMust be true: confirms the user explicitly asked for this irreversible action.

Customers

The people and businesses you invoice.

list_customersreadList customers

Customers with contact details, number of invoices and amount still owed.

ParameterTypeDescription
searchtext
limitnumberMaximum rows to return (1-500).
get_customerreadGet a customer

One customer with their invoices, projects and subscriptions.

ParameterTypeDescription
idrequiredid
create_customerwriteCreate a customer

Adds a customer.

ParameterTypeDescription
namerequiredtext
emailtext or
phonetext
addresstext
notestext
update_customerwriteEdit a customer

Changes a customer's details; omitted fields keep their value.

ParameterTypeDescription
idrequiredid
nametext
emailtext or
phonetext
addresstext
notestext
delete_customerdestructiveDelete a customer

Owner only. Permanently deletes a customer that has no invoices.

ParameterTypeDescription
idrequiredid

Invoices, payments and emails

Invoices from draft to paid, part payments, late fees, write-offs, and customer emails (always drafted first).

list_invoicesreadList invoices

Invoices with totals, amount paid, balance and status (draft, sent, overdue, paid, written_off). Filters: status, customer, project, issue-date range.

ParameterTypeDescription
statusdraft | sent | overdue | paid | written_offoverdue = sent and past its due date.
customer_idid
project_idid
fromdateStart date (inclusive), YYYY-MM-DD.
todateEnd date (inclusive), YYYY-MM-DD.
limitnumberMaximum rows to return (1-500).
get_invoicereadGet an invoice

One invoice with lines, totals, payments, late fees and the emails sent about it.

ParameterTypeDescription
idrequiredid
create_invoicewriteCreate an invoice

Creates a DRAFT invoice. Number, dates, income account and notes/terms default like the app's invoice builder. Use mark_invoice_sent or send_customer_email to send it.

ParameterTypeDescription
customer_ididAn existing customer (see list_customers).
customer_nametextOr a customer name: reuses an exact match, otherwise creates the customer.
project_idid
invoice_numbertextDefaults to the next number.
issue_datedateDefaults to today.
due_datedateDefaults to issue date + the business's payment terms.
income_account_ididIncome account; defaults to Sales.
tax_labeltexte.g. "VAT".
tax_ratenumberPercent, e.g. 18.
discount_typepercent | amount
discount_valuenumber
notestext
termstext
itemsrequiredlist of object
update_invoicewriteEdit an invoice

Changes an invoice; omitted fields keep their value and `items` (if given) replace all lines.

ParameterTypeDescription
idrequiredid
customer_ididAn existing customer (see list_customers).
customer_nametextOr a customer name: reuses an exact match, otherwise creates the customer.
project_idid
invoice_numbertextDefaults to the next number.
issue_datedateDefaults to today.
due_datedateDefaults to issue date + the business's payment terms.
income_account_ididIncome account; defaults to Sales.
tax_labeltexte.g. "VAT".
tax_ratenumberPercent, e.g. 18.
discount_typepercent | amount
discount_valuenumber
notestext
termstext
itemslist of objectReplaces all lines when given.
mark_invoice_sentwriteMark invoice sent

Marks an invoice as sent (it enters the books and can become overdue). Does not email anyone.

ParameterTypeDescription
invoice_idrequiredid
record_invoice_paymentwriteRecord a payment

Records money received against an invoice (part payments allowed). The invoice becomes paid once covered.

ParameterTypeDescription
invoice_idrequiredid
amountrequirednumber
paid_onrequireddateNot in the future.
payment_methodrequiredcash | bank
notetext
remove_invoice_paymentdestructiveRemove a payment

Deletes a recorded payment (and its proof files) from an invoice.

ParameterTypeDescription
invoice_idrequiredid
payment_idrequiredid
add_late_feewriteAdd a late fee

Adds a late fee (fixed amount or % of the balance) to an overdue invoice.

ParameterTypeDescription
invoice_idrequiredid
kindrequiredamount | percent
valuerequirednumber
fee_daterequireddate
notetext
remove_late_feedestructiveRemove a late fee

Deletes a late fee from an invoice.

ParameterTypeDescription
invoice_idrequiredid
late_fee_idrequiredid
write_off_invoicedestructiveWrite off an invoice

Owner only. Writes off the unpaid balance as a bad debt (reversible with reverse_write_off).

ParameterTypeDescription
invoice_idrequiredid
daterequireddate
reasontext
reverse_write_offwriteReverse a write-off

Owner only. Reverses an invoice write-off.

ParameterTypeDescription
invoice_idrequiredid
delete_draft_invoicesdestructiveDelete draft invoices

Permanently deletes DRAFT invoices; sent or paid invoices are kept and counted.

ParameterTypeDescription
idsrequiredlist of id
draft_customer_emailreadDraft a customer email

Prepares (does not send) the email for an invoice, payment receipt, due-date reminder or late-fee notice: recipient, subject and message.

ParameterTypeDescription
kindrequiredinvoice | receipt | reminder | late_fee
invoice_idrequiredid
payment_ididReceipts: the payment.
late_fee_ididLate-fee notices: the fee (defaults to the latest).
send_customer_emaildestructiveSend a customer email

SENDS A REAL EMAIL to the customer through the business's own SMTP server, with the invoice PDF attached (invoice, receipt, reminder or late-fee notice). Emailing a draft invoice marks it sent. Always show the user the draft (draft_customer_email) and get their go-ahead first; requires confirm: true.

ParameterTypeDescription
kindrequiredinvoice | receipt | reminder | late_fee
invoice_idrequiredid
payment_ididReceipts: the payment.
late_fee_ididLate-fee notices: the fee (defaults to the latest).
totextUp to five addresses, comma separated. Defaults to the customer's email.
subjecttextDefaults to the drafted subject.
bodytextDefaults to the drafted message.
confirmrequiredtrueMust be true: the user has seen the draft and asked to send it.

Projects

Fixed-price jobs and retainers, with milestones.

list_projectsreadList projects

Projects with contract value, billed, received, costs and what is left to invoice.

ParameterTypeDescription
customer_idid
statusproposal | active | on_hold | completed | cancelled
get_projectreadGet a project

One project with its figures and milestones.

ParameterTypeDescription
idrequiredid
save_projectwriteCreate or edit a project

Creates a project for a customer, or updates one (fixed price or retainer, discount, advance, dealer commission).

ParameterTypeDescription
ididExisting project to update; omit to create.
customer_idrequiredid
namerequiredtext
descriptiontext
billingrequiredfixed | retainer
valuerequirednumberContract value, or the retainer amount per interval.
billing_intervalmonthly | quarterly | yearly
statusproposal | active | on_hold | completed | cancelled
start_datedate
end_datedate
discount_typepercent | amount
discount_valuenumber
advance_typepercent | amount
advance_valuenumber
dealer_nametext
commission_typepercent | amount
commission_valuenumber
set_project_statuswriteSet project status

Changes a project's status.

ParameterTypeDescription
idrequiredid
statusrequiredproposal | active | on_hold | completed | cancelled
delete_projectdestructiveDelete a project

Owner only. Permanently deletes a project that has no linked invoices or expenses.

ParameterTypeDescription
idrequiredid
save_milestonewriteAdd or edit a milestone

Adds a milestone to a fixed-price project, or edits one that isn't invoiced yet.

ParameterTypeDescription
project_idrequiredid
idid
namerequiredtext
amount_typerequiredpercent | amount
amount_valuerequirednumber
due_datedate
delete_milestonedestructiveDelete a milestone

Deletes a milestone that hasn't been invoiced.

ParameterTypeDescription
project_idrequiredid
idrequiredid

Subscriptions

Plans you sell and pay for, and their renewals.

list_subscriptionsreadList subscriptions

Recurring plans: sale (billed to customers) and cost (bills you pay), with next dates and status.

ParameterTypeDescription
sidesale | cost
statusactive | paused | cancelled
save_subscriptionwriteCreate or edit a subscription

Creates or updates a recurring sale plan (needs customer_id) or cost plan (needs account_id).

ParameterTypeDescription
idid
siderequiredsale | costsale = billed to a customer; cost = a bill you pay.
namerequiredtext
amountrequirednumber
billing_intervalrequiredmonthly | quarterly | yearly
next_daterequireddate
statusactive | paused | cancelled
notestext
customer_ididSale plans: required.
project_idid
cost_amountnumberSale plans: what it costs you.
vendortextCost plans.
account_ididCost plans: required expense category.
payment_methodcash | bankCost plans (default bank).
set_subscription_statuswritePause, cancel or resume plans

Changes the status of one or more subscriptions, with an optional reason.

ParameterTypeDescription
idsrequiredlist of id
statusrequiredactive | paused | cancelled
reasontext
notetext
delete_subscriptionsdestructiveDelete subscriptions

Owner only. Permanently deletes plans (invoices and expenses made from them stay).

ParameterTypeDescription
idsrequiredlist of id
log_subscription_paymentwriteLog a cost subscription payment

Records this period's payment of a cost subscription as an expense and moves its next date on.

ParameterTypeDescription
idrequiredid
mark_renewal_notice_sentwriteMark renewal notices sent

Records that renewal notices were sent for these sale plans (does not send anything).

ParameterTypeDescription
idsrequiredlist of id

Capital, loans and the cashbook

Money in and out that isn't a sale or an expense, and every movement of cash.

list_journal_entriesreadList capital, loan and asset entries

Journal entries (capital introduced, loans, repayments, drawings, asset purchases, tax payments, other money in or out, cash/bank transfers, depreciation, custom) with their lines.

ParameterTypeDescription
fromdateStart date (inclusive), YYYY-MM-DD.
todateEnd date (inclusive), YYYY-MM-DD.
kindcapital | loan_received | loan_repayment | drawings | asset_purchase | tax_payment | other_in | other_out | transfer | depreciation | custom
limitnumberMaximum rows to return (1-500).
record_journal_entrywriteRecord capital, a loan, drawings or an asset

Owner only. Records a plain-language entry as a balanced double entry, including other money in or out that isn't an invoice payment or an expense, and moving money between cash and bank. Use list_accounts for account ids.

ParameterTypeDescription
kindrequiredcapital | loan_received | loan_repayment | drawings | asset_purchase | tax_payment | other_in | other_out | transfer | depreciation | custom
entry_daterequireddate
descriptiontext
amountnumberAll kinds except custom.
money_account_ididBank or cash account (capital, loans, drawings, tax payments, other_in, other_out).
other_account_ididother_in: where the money came from (e.g. Other income, a deposit returned). other_out: what it was for (e.g. a deposit paid, VAT owed, a refund to a customer).
from_account_ididtransfer: the bank or cash account the money left.
to_account_ididtransfer: the bank or cash account the money went into.
lender_account_ididLoan account (loan_received, loan_repayment).
asset_account_ididAsset account (asset_purchase).
funding_account_ididPaid from (asset_purchase): bank, cash, payables or a loan.
lineslist of objectcustom only: balanced debit/credit lines.
delete_journal_entrydestructiveDelete a journal entry

Owner only. Permanently deletes a journal entry and its attached documents.

ParameterTypeDescription
idrequiredid
get_cashbookreadCashbook

Every cash and bank movement (expenses, payments received, journals) in a date range with opening, money in, money out, closing and running balance.

ParameterTypeDescription
fromdateStart date (inclusive), YYYY-MM-DD.
todateEnd date (inclusive), YYYY-MM-DD.
methodcash | bank
directionin | out
searchtext
limitnumberMaximum rows to return (1-1000).
set_entry_notewriteNote on an entry

Owner only. Sets the note on an expense, payment or journal entry.

ParameterTypeDescription
kindrequiredexpense | payment | journal
idrequiredid
noterequiredtextEmpty to clear.

Statements and tax

Financial statements by period, and the income tax estimate.

list_statement_periodsreadList statement periods

Saved financial-statement periods (draft or final).

No parameters.

get_financial_statementsreadFinancial statements

Owner only. Statement of comprehensive income, financial position, notes and tax computation, for a saved period or any date range (accrual or cash basis).

ParameterTypeDescription
period_ididA saved period (includes its adjustments / frozen snapshot).
fromdate
todate
basisaccrual | cash
create_statement_periodwriteCreate a statement period

Owner only. Creates a draft period for financial statements.

ParameterTypeDescription
namerequiredtext
period_startrequireddate
period_endrequireddate
basisrequiredaccrual | cash
delete_statement_perioddestructiveDelete a statement period

Owner only. Deletes a draft period and its adjustments.

ParameterTypeDescription
idrequiredid
adjust_statement_linewriteAdjust a statement line

Owner only. Overrides one line of a draft period with a logged reason (append-only).

ParameterTypeDescription
period_idrequiredid
line_referencerequiredtext
adjusted_valuerequirednumber
noterequiredtext
finalize_statement_perioddestructiveFinalise a statement period

Owner only. IRREVERSIBLY locks the period: stores a frozen snapshot and blocks any change to transactions dated in or before it. Requires confirm: true.

ParameterTypeDescription
idrequiredid
confirmrequiredtrueMust be true: confirms the user explicitly asked for this irreversible action.
get_tax_planreadTax plan

Owner only. Estimated income tax for the tax year to date, projected for the year, with quarterly instalments, due dates and payments made.

No parameters.

update_tax_ruleswriteUpdate tax rates

Owner only. Sets the corporate income tax rate, VAT rate and VAT registration threshold used in statements.

ParameterTypeDescription
corporate_income_tax_raterequirednumberPercent.
vat_raterequirednumberPercent.
vat_registration_thresholdrequirednumber

Reports

Read-only summaries, on demand, with flexible filters.

financial_summaryreadFinancial summary

Owner only. For any date range (default: tax year to date): income, spending, profit, cash and bank balances, money owed, spending by category, income by customer and month by month.

ParameterTypeDescription
fromdateStart date (inclusive), YYYY-MM-DD.
todateEnd date (inclusive), YYYY-MM-DD.
basisaccrual | cash
expense_reportreadExpense report

Totals and counts of expenses for a date range, grouped by category, vendor, month, payment method or project, with filters and receipts missing.

ParameterTypeDescription
fromdateStart date (inclusive), YYYY-MM-DD.
todateEnd date (inclusive), YYYY-MM-DD.
category_idid
payment_methodcash | bank
vendortextVendor contains this text.
project_idid
missing_receiptboolean
group_bycategory | vendor | month | payment_method | project
sales_reportreadSales report

Invoiced, tax, paid and outstanding for a date range, grouped by customer, month or status.

ParameterTypeDescription
fromdateStart date (inclusive), YYYY-MM-DD.
todateEnd date (inclusive), YYYY-MM-DD.
customer_idid
statusdraft | sent | overdue | paid | written_off
group_bycustomer | month | status
outstanding_invoicesreadOutstanding invoices

Money owed by customers: every unpaid sent invoice with days late, ageing buckets and totals per customer.

ParameterTypeDescription
customer_idid
as_ofdate
cash_flowreadCash flow

Owner only. Money in and out of cash and bank by month for a date range, with opening and closing balances.

ParameterTypeDescription
fromdateStart date (inclusive), YYYY-MM-DD.
todateEnd date (inclusive), YYYY-MM-DD.
methodcash | bank
upcoming_duereadWhat's due

Invoices falling due, sale subscriptions to invoice, cost renewals to pay and retainers not yet billed in the next N days.

ParameterTypeDescription
daysnumber