Skip to main content
Glama

list_cospend_bills

Read-onlyIdempotent

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

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
deletedNo
reverseNo
payer_idNo
project_idYes
category_idNo
search_termNo
last_changedNo
include_bill_idNo
payment_mode_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark the operation as read-only, idempotent, and non-destructive. The description goes well beyond this by disclosing default server ordering, the search_term/limit interaction where Cospend silently ignores search without a limit and the tool raises ValueError, and the precise semantics of nb_bills versus bills regarding search_term. This gives an agent the behavioral quirks it needs to predict results.

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?

The description is long because 11 parameters and their subtleties demand it. It is structured into clear Args and Returns sections, with each line adding information (e.g., offset default ordering, search_term gotcha). No filler or repetition is present.

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

Completeness5/5

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

For a read-only list operation with an output schema present, the description covers the required access level, all parameters, and the shape and semantics of the return object. It even documents a tricky counterintuitive behavior in nb_bills. An agent has everything needed to call and interpret the result.

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

Parameters5/5

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

The input schema provides zero descriptions for its 11 parameters, so the description carries the full burden. It explains every parameter, including defaults (deleted=0, reverse=false), types, and special constraints such as search_term requiring limit and the meaning of include_bill_id. This fully compensates for the schema gap.

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

Purpose5/5

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

The description opens with a specific verb and resource: 'List bills (expenses) in a Cospend project.' This is unambiguous and separates it from sibling bill tools like get_cospend_bill, create_cospend_bill, and delete_cospend_bill. The phrase 'see get_cospend_bill for fields' further clarifies the tool's role as the list counterpart.

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

Usage Guidelines4/5

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

The description states a permission prerequisite (VIEWER access) and gives extensive context about filter behavior, but it does not explicitly state when to choose this over get_cospend_bill or when not to use it. However, the listing scope and the pointer to get_cospend_bill for individual bill fields imply the intended use case clearly. No misleading guidance is present.

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