hdls Expenses

hdls Expenses is a headless, MCP-native expense management backend. It manages expenses, reports, and approvals, operated entirely through named tools your AI assistant calls. It stands in for tools like Expensify, Ramp — same job, no UI to run.

💬 Just ask

"Log a $45 lunch expense and show me this month's total."

You don't call these tools yourself — just tell your assistant in plain English. Everything below is the reference for when you (or your assistant) want the exact details.

How Expenses is organized

The headline entity is the expense — start there, then attach the rest to it. The approval_event table is an append-only timeline — every change and note lands there and is never edited or deleted.

EntityPurposeRelates to
expenseA single spend line (merchant, amount, receipt) coded to a category and grouped into a report.report, category
categoryA spend category used to code expenses to a GL account for accounting export.
reportAn expense report bundling individual expenses for a single submit/approve/reimburse cycle.
approval_eventAppend-only approval/audit timeline for expenses and reports (polymorphic via entity_type/entity_id).

Common workflows

Each line is one real sequence of tool calls — your assistant chains them for you.

  • Move an expense through its lifecycle: create_expensesubmit_report

Tools

Call these at https://hdls.ai/api/mcp/expenses. Required fields you must supply; optional fields refine the call. You never pass tenant_id — it is stamped server-side.

Create

ToolWhat it doesRequiredOptional
create_expenseCreate a new expense.descriptionreport_id, category_id, merchant, status, amount, currency

Update & advance

ToolWhat it doesRequiredOptional
approve_expenseApprove the expense.id
categorizeCategorize the record.id

Find & read

ToolWhat it doesRequiredOptional
submit_reportReport on report.
search_expensesSearch expenses by free-text and/or column filters (tenant-scoped, paginated).search, filters, limit, orderBy

Field lists come from the product's live schema and are embedded in each tool's own description — read the tool description for the exact, current fields.

Field reference

Every field you can set on each record. Custom fields you add live alongside these in data.

expense

FieldTypeRequiredNotes
report_ididLinks to a report.
category_ididLinks to a category.
merchanttext
descriptiontextYes
statustextLifecycle state.
amountnumeric(14,2)
currencytext
payment_methodtext
spent_ondate
receipt_urltext
is_billabletrue / false
submittertext
datajsonFree-form JSON — custom fields live here.

category

FieldTypeRequiredNotes
nametextYesDisplay name.
codetext
gl_accounttext
is_activetrue / false
datajsonFree-form JSON — custom fields live here.

report

FieldTypeRequiredNotes
titletextYesDisplay name.
submittertext
statustextLifecycle state.
currencytext
totalnumeric(14,2)
submitted_attimestamp
approved_attimestamp
reimbursed_attimestamp
datajsonFree-form JSON — custom fields live here.

Tailor it with custom fields

Add fields without a schema change. add_custom_field defines one, list_custom_fields shows what's defined, and promote_custom_field (admin) shares a personal field with the whole workspace. The value lives in each row's data (JSON) and is set and read through the normal record tools. See Products, tools & custom fields for the full model.

Roles & safety

  • Tenant isolation is automatic. Your credential is pinned to one workspace; you never pass tenant_id, and you can only ever see your own data (enforced by Postgres row-level security).
  • Role-gated. Permissions run reader < member < admin < owner. Installing a product and promoting a custom field workspace-wide need admin/owner.
  • History is append-only. The approval_event timeline is never edited or deleted — it's your audit trail.

Connect

On the concierge (https://hdls.ai/api/mcp), run install_product({ slug: "expenses" }) (admin/owner) to enable it for your workspace, then add https://hdls.ai/api/mcp/expenses as a connector in your assistant — see Connect your assistant.

A worked example

The literal call your assistant makes when you ask it to create the headline record:

Tool: create_expense
Arguments: {
  "description": "Notes go here."
}

See All products · Connect your assistant · Automation