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.
| Label | Meaning |
|---|---|
| Read | Only reads. Safe to allow without asking. |
| Write | Adds or changes records. |
| Destructive | Deletes, 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 IThe signed-in person, their business (name, currency, tax year), role, permissions and which sections are switched on. Call this first.
No parameters.
list_accountsreadList accountsThe business's chart of accounts (income, expense, asset, liability, equity), with ids used by other tools.
| Parameter | Type | Description |
|---|---|---|
type | asset | liability | equity | income | expense | |
include_inactive | boolean |
list_expense_categoriesreadList expense categoriesCategories an expense can be filed under (expense accounts and long-term asset accounts), most used first.
No parameters.
save_accountwriteCreate or rename an accountOwner only. Creates a category/account (code, name, group) or renames an existing one and sets whether it is tax-deductible.
| Parameter | Type | Description |
|---|---|---|
id | id | Existing account to rename / change; omit to create one. |
code | text | New accounts only: a unique code, e.g. 6200. |
namerequired | text | |
group | operating | cost_of_sales | revenue | other_income | New accounts only: operating/cost_of_sales are expense accounts; revenue/other_income are income. |
tax_deductible | boolean |
Expenses
Spending, with receipts. Deleting moves to the Deleted view first.
list_expensesreadList expensesExpenses with filters (dates, category, cash/bank, project, missing receipt, text search). Newest first.
| Parameter | Type | Description |
|---|---|---|
from | date | Start date (inclusive), YYYY-MM-DD. |
to | date | End date (inclusive), YYYY-MM-DD. |
category_id | id | Only this category (chart of accounts id). |
payment_method | cash | bank | |
project_id | id | |
missing_receipt | boolean | Only expenses without any receipt attached. |
search | text | Matches description, vendor and note. |
deleted | boolean | List deleted (restorable) expenses instead. |
limit | number | Maximum rows to return (1-500). |
get_expensereadGet an expenseOne expense with its receipts (short-lived download links), payslip/voucher details and edit history.
| Parameter | Type | Description |
|---|---|---|
idrequired | id |
create_expensewriteSubmit an expenseRecords an expense (amount, category, date, cash/bank, description, vendor, project, note). Dates in a finalised period are refused.
| Parameter | Type | Description |
|---|---|---|
amountrequired | number | |
account_idrequired | id | Category: an id from list_expense_categories. |
expense_daterequired | date | When it was paid (not in the future). |
payment_methodrequired | cash | bank | |
description | text | |
vendor | text | Who was paid. |
project_id | id | Tag the cost to a project. |
note | text |
update_expensewriteEdit an expenseChanges fields of an expense; omitted fields keep their current value. The edit is kept in the expense's history.
| Parameter | Type | Description |
|---|---|---|
idrequired | id | |
amount | number | |
account_id | id | Category: an id from list_expense_categories. |
expense_date | date | When it was paid (not in the future). |
payment_method | cash | bank | |
description | text | |
vendor | text | Who was paid. |
project_id | id | Tag the cost to a project. |
note | text |
suggest_expense_categoryreadSuggest a categorySuggests the category for an expense description, from the business's own history and common rules.
| Parameter | Type | Description |
|---|---|---|
textrequired | text | What was bought / who was paid. |
recategorize_expenseswriteRecategorise expensesMoves several expenses to another category.
| Parameter | Type | Description |
|---|---|---|
idsrequired | list of id | |
account_idrequired | id |
add_expense_receiptwriteAttach a receiptUploads a receipt (JPEG, PNG, WebP, HEIC or PDF, base64, up to ~6 MB) to an expense.
| Parameter | Type | Description |
|---|---|---|
expense_idrequired | id | |
file_namerequired | text | |
content_typerequired | image/jpeg | image/png | image/webp | image/heic | application/pdf | |
content_base64required | text | The file's bytes, base64-encoded (max ~6 MB). |
remove_expense_receiptdestructiveRemove a receiptDeletes a receipt file from an expense. Not allowed for expenses in a finalised period.
| Parameter | Type | Description |
|---|---|---|
attachment_idrequired | id |
delete_expensesdestructiveDelete expensesOwner only. Moves expenses to Deleted (soft delete: history kept, can be restored with restore_expenses). Expenses in a finalised period are skipped.
| Parameter | Type | Description |
|---|---|---|
idsrequired | list of id |
restore_expenseswriteRestore expensesOwner only. Restores deleted expenses.
| Parameter | Type | Description |
|---|---|---|
idsrequired | list of id |
purge_expensesdestructiveErase expenses permanentlyOwner only. IRREVERSIBLY erases expenses that are already deleted, with their history and receipt files. Requires confirm: true.
| Parameter | Type | Description |
|---|---|---|
idsrequired | list of id | |
confirmrequired | true | Must be true: confirms the user explicitly asked for this irreversible action. |
Customers
The people and businesses you invoice.
list_customersreadList customersCustomers with contact details, number of invoices and amount still owed.
| Parameter | Type | Description |
|---|---|---|
search | text | |
limit | number | Maximum rows to return (1-500). |
get_customerreadGet a customerOne customer with their invoices, projects and subscriptions.
| Parameter | Type | Description |
|---|---|---|
idrequired | id |
create_customerwriteCreate a customerAdds a customer.
| Parameter | Type | Description |
|---|---|---|
namerequired | text | |
email | text or | |
phone | text | |
address | text | |
notes | text |
update_customerwriteEdit a customerChanges a customer's details; omitted fields keep their value.
| Parameter | Type | Description |
|---|---|---|
idrequired | id | |
name | text | |
email | text or | |
phone | text | |
address | text | |
notes | text |
delete_customerdestructiveDelete a customerOwner only. Permanently deletes a customer that has no invoices.
| Parameter | Type | Description |
|---|---|---|
idrequired | id |
Invoices, payments and emails
Invoices from draft to paid, part payments, late fees, write-offs, and customer emails (always drafted first).
list_invoicesreadList invoicesInvoices with totals, amount paid, balance and status (draft, sent, overdue, paid, written_off). Filters: status, customer, project, issue-date range.
| Parameter | Type | Description |
|---|---|---|
status | draft | sent | overdue | paid | written_off | overdue = sent and past its due date. |
customer_id | id | |
project_id | id | |
from | date | Start date (inclusive), YYYY-MM-DD. |
to | date | End date (inclusive), YYYY-MM-DD. |
limit | number | Maximum rows to return (1-500). |
get_invoicereadGet an invoiceOne invoice with lines, totals, payments, late fees and the emails sent about it.
| Parameter | Type | Description |
|---|---|---|
idrequired | id |
create_invoicewriteCreate an invoiceCreates 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.
| Parameter | Type | Description |
|---|---|---|
customer_id | id | An existing customer (see list_customers). |
customer_name | text | Or a customer name: reuses an exact match, otherwise creates the customer. |
project_id | id | |
invoice_number | text | Defaults to the next number. |
issue_date | date | Defaults to today. |
due_date | date | Defaults to issue date + the business's payment terms. |
income_account_id | id | Income account; defaults to Sales. |
tax_label | text | e.g. "VAT". |
tax_rate | number | Percent, e.g. 18. |
discount_type | percent | amount | |
discount_value | number | |
notes | text | |
terms | text | |
itemsrequired | list of object |
update_invoicewriteEdit an invoiceChanges an invoice; omitted fields keep their value and `items` (if given) replace all lines.
| Parameter | Type | Description |
|---|---|---|
idrequired | id | |
customer_id | id | An existing customer (see list_customers). |
customer_name | text | Or a customer name: reuses an exact match, otherwise creates the customer. |
project_id | id | |
invoice_number | text | Defaults to the next number. |
issue_date | date | Defaults to today. |
due_date | date | Defaults to issue date + the business's payment terms. |
income_account_id | id | Income account; defaults to Sales. |
tax_label | text | e.g. "VAT". |
tax_rate | number | Percent, e.g. 18. |
discount_type | percent | amount | |
discount_value | number | |
notes | text | |
terms | text | |
items | list of object | Replaces all lines when given. |
mark_invoice_sentwriteMark invoice sentMarks an invoice as sent (it enters the books and can become overdue). Does not email anyone.
| Parameter | Type | Description |
|---|---|---|
invoice_idrequired | id |
get_invoice_pdf_linkreadInvoice PDF linkGenerates the invoice PDF and returns a download link valid for 15 minutes.
| Parameter | Type | Description |
|---|---|---|
invoice_idrequired | id |
record_invoice_paymentwriteRecord a paymentRecords money received against an invoice (part payments allowed). The invoice becomes paid once covered.
| Parameter | Type | Description |
|---|---|---|
invoice_idrequired | id | |
amountrequired | number | |
paid_onrequired | date | Not in the future. |
payment_methodrequired | cash | bank | |
note | text |
remove_invoice_paymentdestructiveRemove a paymentDeletes a recorded payment (and its proof files) from an invoice.
| Parameter | Type | Description |
|---|---|---|
invoice_idrequired | id | |
payment_idrequired | id |
add_late_feewriteAdd a late feeAdds a late fee (fixed amount or % of the balance) to an overdue invoice.
| Parameter | Type | Description |
|---|---|---|
invoice_idrequired | id | |
kindrequired | amount | percent | |
valuerequired | number | |
fee_daterequired | date | |
note | text |
remove_late_feedestructiveRemove a late feeDeletes a late fee from an invoice.
| Parameter | Type | Description |
|---|---|---|
invoice_idrequired | id | |
late_fee_idrequired | id |
write_off_invoicedestructiveWrite off an invoiceOwner only. Writes off the unpaid balance as a bad debt (reversible with reverse_write_off).
| Parameter | Type | Description |
|---|---|---|
invoice_idrequired | id | |
daterequired | date | |
reason | text |
reverse_write_offwriteReverse a write-offOwner only. Reverses an invoice write-off.
| Parameter | Type | Description |
|---|---|---|
invoice_idrequired | id |
delete_draft_invoicesdestructiveDelete draft invoicesPermanently deletes DRAFT invoices; sent or paid invoices are kept and counted.
| Parameter | Type | Description |
|---|---|---|
idsrequired | list of id |
draft_customer_emailreadDraft a customer emailPrepares (does not send) the email for an invoice, payment receipt, due-date reminder or late-fee notice: recipient, subject and message.
| Parameter | Type | Description |
|---|---|---|
kindrequired | invoice | receipt | reminder | late_fee | |
invoice_idrequired | id | |
payment_id | id | Receipts: the payment. |
late_fee_id | id | Late-fee notices: the fee (defaults to the latest). |
send_customer_emaildestructiveSend a customer emailSENDS 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.
| Parameter | Type | Description |
|---|---|---|
kindrequired | invoice | receipt | reminder | late_fee | |
invoice_idrequired | id | |
payment_id | id | Receipts: the payment. |
late_fee_id | id | Late-fee notices: the fee (defaults to the latest). |
to | text | Up to five addresses, comma separated. Defaults to the customer's email. |
subject | text | Defaults to the drafted subject. |
body | text | Defaults to the drafted message. |
confirmrequired | true | Must be true: the user has seen the draft and asked to send it. |
Projects
Fixed-price jobs and retainers, with milestones.
list_projectsreadList projectsProjects with contract value, billed, received, costs and what is left to invoice.
| Parameter | Type | Description |
|---|---|---|
customer_id | id | |
status | proposal | active | on_hold | completed | cancelled |
get_projectreadGet a projectOne project with its figures and milestones.
| Parameter | Type | Description |
|---|---|---|
idrequired | id |
save_projectwriteCreate or edit a projectCreates a project for a customer, or updates one (fixed price or retainer, discount, advance, dealer commission).
| Parameter | Type | Description |
|---|---|---|
id | id | Existing project to update; omit to create. |
customer_idrequired | id | |
namerequired | text | |
description | text | |
billingrequired | fixed | retainer | |
valuerequired | number | Contract value, or the retainer amount per interval. |
billing_interval | monthly | quarterly | yearly | |
status | proposal | active | on_hold | completed | cancelled | |
start_date | date | |
end_date | date | |
discount_type | percent | amount | |
discount_value | number | |
advance_type | percent | amount | |
advance_value | number | |
dealer_name | text | |
commission_type | percent | amount | |
commission_value | number |
set_project_statuswriteSet project statusChanges a project's status.
| Parameter | Type | Description |
|---|---|---|
idrequired | id | |
statusrequired | proposal | active | on_hold | completed | cancelled |
delete_projectdestructiveDelete a projectOwner only. Permanently deletes a project that has no linked invoices or expenses.
| Parameter | Type | Description |
|---|---|---|
idrequired | id |
save_milestonewriteAdd or edit a milestoneAdds a milestone to a fixed-price project, or edits one that isn't invoiced yet.
| Parameter | Type | Description |
|---|---|---|
project_idrequired | id | |
id | id | |
namerequired | text | |
amount_typerequired | percent | amount | |
amount_valuerequired | number | |
due_date | date |
delete_milestonedestructiveDelete a milestoneDeletes a milestone that hasn't been invoiced.
| Parameter | Type | Description |
|---|---|---|
project_idrequired | id | |
idrequired | id |
Subscriptions
Plans you sell and pay for, and their renewals.
list_subscriptionsreadList subscriptionsRecurring plans: sale (billed to customers) and cost (bills you pay), with next dates and status.
| Parameter | Type | Description |
|---|---|---|
side | sale | cost | |
status | active | paused | cancelled |
save_subscriptionwriteCreate or edit a subscriptionCreates or updates a recurring sale plan (needs customer_id) or cost plan (needs account_id).
| Parameter | Type | Description |
|---|---|---|
id | id | |
siderequired | sale | cost | sale = billed to a customer; cost = a bill you pay. |
namerequired | text | |
amountrequired | number | |
billing_intervalrequired | monthly | quarterly | yearly | |
next_daterequired | date | |
status | active | paused | cancelled | |
notes | text | |
customer_id | id | Sale plans: required. |
project_id | id | |
cost_amount | number | Sale plans: what it costs you. |
vendor | text | Cost plans. |
account_id | id | Cost plans: required expense category. |
payment_method | cash | bank | Cost plans (default bank). |
set_subscription_statuswritePause, cancel or resume plansChanges the status of one or more subscriptions, with an optional reason.
| Parameter | Type | Description |
|---|---|---|
idsrequired | list of id | |
statusrequired | active | paused | cancelled | |
reason | text | |
note | text |
delete_subscriptionsdestructiveDelete subscriptionsOwner only. Permanently deletes plans (invoices and expenses made from them stay).
| Parameter | Type | Description |
|---|---|---|
idsrequired | list of id |
log_subscription_paymentwriteLog a cost subscription paymentRecords this period's payment of a cost subscription as an expense and moves its next date on.
| Parameter | Type | Description |
|---|---|---|
idrequired | id |
mark_renewal_notice_sentwriteMark renewal notices sentRecords that renewal notices were sent for these sale plans (does not send anything).
| Parameter | Type | Description |
|---|---|---|
idsrequired | list 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 entriesJournal entries (capital introduced, loans, repayments, drawings, asset purchases, tax payments, other money in or out, cash/bank transfers, depreciation, custom) with their lines.
| Parameter | Type | Description |
|---|---|---|
from | date | Start date (inclusive), YYYY-MM-DD. |
to | date | End date (inclusive), YYYY-MM-DD. |
kind | capital | loan_received | loan_repayment | drawings | asset_purchase | tax_payment | other_in | other_out | transfer | depreciation | custom | |
limit | number | Maximum rows to return (1-500). |
record_journal_entrywriteRecord capital, a loan, drawings or an assetOwner 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.
| Parameter | Type | Description |
|---|---|---|
kindrequired | capital | loan_received | loan_repayment | drawings | asset_purchase | tax_payment | other_in | other_out | transfer | depreciation | custom | |
entry_daterequired | date | |
description | text | |
amount | number | All kinds except custom. |
money_account_id | id | Bank or cash account (capital, loans, drawings, tax payments, other_in, other_out). |
other_account_id | id | other_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_id | id | transfer: the bank or cash account the money left. |
to_account_id | id | transfer: the bank or cash account the money went into. |
lender_account_id | id | Loan account (loan_received, loan_repayment). |
asset_account_id | id | Asset account (asset_purchase). |
funding_account_id | id | Paid from (asset_purchase): bank, cash, payables or a loan. |
lines | list of object | custom only: balanced debit/credit lines. |
delete_journal_entrydestructiveDelete a journal entryOwner only. Permanently deletes a journal entry and its attached documents.
| Parameter | Type | Description |
|---|---|---|
idrequired | id |
get_cashbookreadCashbookEvery cash and bank movement (expenses, payments received, journals) in a date range with opening, money in, money out, closing and running balance.
| Parameter | Type | Description |
|---|---|---|
from | date | Start date (inclusive), YYYY-MM-DD. |
to | date | End date (inclusive), YYYY-MM-DD. |
method | cash | bank | |
direction | in | out | |
search | text | |
limit | number | Maximum rows to return (1-1000). |
set_entry_notewriteNote on an entryOwner only. Sets the note on an expense, payment or journal entry.
| Parameter | Type | Description |
|---|---|---|
kindrequired | expense | payment | journal | |
idrequired | id | |
noterequired | text | Empty to clear. |
Statements and tax
Financial statements by period, and the income tax estimate.
list_statement_periodsreadList statement periodsSaved financial-statement periods (draft or final).
No parameters.
get_financial_statementsreadFinancial statementsOwner only. Statement of comprehensive income, financial position, notes and tax computation, for a saved period or any date range (accrual or cash basis).
| Parameter | Type | Description |
|---|---|---|
period_id | id | A saved period (includes its adjustments / frozen snapshot). |
from | date | |
to | date | |
basis | accrual | cash |
create_statement_periodwriteCreate a statement periodOwner only. Creates a draft period for financial statements.
| Parameter | Type | Description |
|---|---|---|
namerequired | text | |
period_startrequired | date | |
period_endrequired | date | |
basisrequired | accrual | cash |
delete_statement_perioddestructiveDelete a statement periodOwner only. Deletes a draft period and its adjustments.
| Parameter | Type | Description |
|---|---|---|
idrequired | id |
adjust_statement_linewriteAdjust a statement lineOwner only. Overrides one line of a draft period with a logged reason (append-only).
| Parameter | Type | Description |
|---|---|---|
period_idrequired | id | |
line_referencerequired | text | |
adjusted_valuerequired | number | |
noterequired | text |
finalize_statement_perioddestructiveFinalise a statement periodOwner only. IRREVERSIBLY locks the period: stores a frozen snapshot and blocks any change to transactions dated in or before it. Requires confirm: true.
| Parameter | Type | Description |
|---|---|---|
idrequired | id | |
confirmrequired | true | Must be true: confirms the user explicitly asked for this irreversible action. |
get_tax_planreadTax planOwner 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 ratesOwner only. Sets the corporate income tax rate, VAT rate and VAT registration threshold used in statements.
| Parameter | Type | Description |
|---|---|---|
corporate_income_tax_raterequired | number | Percent. |
vat_raterequired | number | Percent. |
vat_registration_thresholdrequired | number |
Reports
Read-only summaries, on demand, with flexible filters.
financial_summaryreadFinancial summaryOwner 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.
| Parameter | Type | Description |
|---|---|---|
from | date | Start date (inclusive), YYYY-MM-DD. |
to | date | End date (inclusive), YYYY-MM-DD. |
basis | accrual | cash |
expense_reportreadExpense reportTotals and counts of expenses for a date range, grouped by category, vendor, month, payment method or project, with filters and receipts missing.
| Parameter | Type | Description |
|---|---|---|
from | date | Start date (inclusive), YYYY-MM-DD. |
to | date | End date (inclusive), YYYY-MM-DD. |
category_id | id | |
payment_method | cash | bank | |
vendor | text | Vendor contains this text. |
project_id | id | |
missing_receipt | boolean | |
group_by | category | vendor | month | payment_method | project |
sales_reportreadSales reportInvoiced, tax, paid and outstanding for a date range, grouped by customer, month or status.
| Parameter | Type | Description |
|---|---|---|
from | date | Start date (inclusive), YYYY-MM-DD. |
to | date | End date (inclusive), YYYY-MM-DD. |
customer_id | id | |
status | draft | sent | overdue | paid | written_off | |
group_by | customer | month | status |
outstanding_invoicesreadOutstanding invoicesMoney owed by customers: every unpaid sent invoice with days late, ageing buckets and totals per customer.
| Parameter | Type | Description |
|---|---|---|
customer_id | id | |
as_of | date |
cash_flowreadCash flowOwner only. Money in and out of cash and bank by month for a date range, with opening and closing balances.
| Parameter | Type | Description |
|---|---|---|
from | date | Start date (inclusive), YYYY-MM-DD. |
to | date | End date (inclusive), YYYY-MM-DD. |
method | cash | bank |
upcoming_duereadWhat's dueInvoices falling due, sale subscriptions to invoice, cost renewals to pay and retainers not yet billed in the next N days.
| Parameter | Type | Description |
|---|---|---|
days | number |