list_cospend_bills
Retrieve expense bills from a Cospend project with filters for payer, category, payment mode, search, and pagination. Get a list of bills along with counts and IDs for further processing.
Instructions
List bills (expenses) in a Cospend project.
Requires VIEWER access.
Args:
project_id: String project id.
offset: Skip the first N bills (server orders by date desc by default).
limit: Max bills to return. Omit for no limit.
reverse: If True, oldest-first instead of newest-first.
last_changed: Only return bills modified after this Unix timestamp.
payer_id: Filter to bills paid by this member.
category_id: Filter by category.
payment_mode_id: Filter by payment mode.
include_bill_id: Force-include this bill id in the result even if
it would be paginated out (used to keep a focused bill in view).
search_term: Substring match (case-insensitive) on bill what,
comment, or amount±1. REQUIRES limit to be set — Cospend
silently ignores the search and returns unfiltered results
when no limit is provided, so this tool raises ValueError if
search_term is given without limit. Pass any limit
(e.g. 1000) to apply the filter.
deleted: 0 = live bills (default), 1 = trashed bills only.
Returns:
JSON object with bills (list of bill dicts — see get_cospend_bill
for fields), nb_bills (project-wide bill count under the
payer/category/payment-mode/deleted filters; NOT affected by
search_term even when search filters bills), allBillIds
(full id list before pagination), timestamp (server response time).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| deleted | No | ||
| reverse | No | ||
| payer_id | No | ||
| project_id | Yes | ||
| category_id | No | ||
| search_term | No | ||
| last_changed | No | ||
| include_bill_id | No | ||
| payment_mode_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |