Skip to main content
Glama

Create expense

crunch_create_expense

Record an expense in Crunch accounting with supplier, date, line items, optional payment and receipt; validate reference values and refuse duplicates unless allowed.

Instructions

Record an expense: who it was from, the date, one or more lines (expense type, VAT type, gross amount), and optionally how it was paid and the receipt. Look up valid values first: crunch_list_expense_types, crunch_list_vat_types, crunch_list_payment_methods, crunch_list_bank_accounts. The date must be in an open accounting period. Refuses an expense that matches an existing one (same supplier, date, gross amount and supplier reference) unless allow_duplicate=true.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "line_items": "<line_items>",
      "posting_date": "<posting_date>"
    },
    "name": "crunch_create_expense"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoInternal note
extraNoAdditional raw ExpenseDto fields, using Crunch's own field names (advanced). Merged last.
dry_runNoPreview: return the request that would be sent (for an update, the fields that would change) without sending it
paymentsNoHow it was paid; leave out to record it as unpaid
line_itemsYesOne or more lines, each with its own expense type, VAT type and amount
attachmentsNoReceipts or invoices to attach
supplier_idNoSupplier ID (see crunch_list_suppliers). Give this or supplier_name.
posting_dateYesDate of the expense or receipt (YYYY-MM-DD); must be in an open accounting period
supplier_nameNoInstead of supplier_id: the supplier's exact name
allow_duplicateNoCreate the expense even if one with the same supplier, date, gross amount and supplier reference already exists (default false: refuse, and name the existing expense)
create_supplierNoWith supplier_name: create the supplier if it doesn't exist yet (default false)
supplier_referenceNoThe supplier's invoice or receipt number

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this is a non-read-only, non-idempotent, non-destructive write, so the safety profile is covered. The description adds real behavior beyond that: duplicate detection keyed on supplier/date/gross amount/supplier reference, the refusal-then-override path, and the open-period constraint. It does not say what the call returns or what happens on validation failure, which keeps it off a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded: what gets recorded, what to look up first, then the failure/override rule. No repetition of schema detail, no filler. Each sentence carries a distinct obligation for the caller.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter nested write with no output schema and no annotations covering business rules, the description supplies the prerequisites, the duplicate policy and the lookup routing that would otherwise be invisible. What it leaves out is the success response (e.g. the created expense id) and how validation errors surface, a modest gap given everything else is covered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3 and the schema already explains every parameter. The description still adds framing the schema does not: which fields form the duplicate-matching key (supplier, date, gross amount, supplier reference) and the grouping of inputs into header, lines, payment and receipt. That is meaningful semantics on top of an already-documented schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Record an expense') and immediately enumerates the record's structure: supplier, date, line items with expense type/VAT/gross amount, payment and receipt. That is far beyond restating the title. It does not explicitly contrast itself with crunch_create_recurring_expense or crunch_update_expense, so it stops short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete pre-work: look up valid values via crunch_list_expense_types, crunch_list_vat_types, crunch_list_payment_methods and crunch_list_bank_accounts before calling. Adds a hard precondition ('The date must be in an open accounting period') and states the refusal rule with its explicit override (allow_duplicate=true). An agent knows both when to call it and what must be true first.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools