Skip to main content
Glama

get_cospend_project_statistics

Read-onlyIdempotent

Generate per-member spending statistics for a Cospend project using optional filters for date range, amount, category, payment mode, and payer.

Instructions

Per-member spending statistics for a Cospend project.

Requires VIEWER access. All filters are optional and AND-combined.

Args: project_id: String project id. ts_min: Only include bills with timestamp >= ts_min (Unix seconds). ts_max: Only include bills with timestamp <= ts_max. payment_mode_id: Filter by payment mode. category_id: Filter by category. amount_min: Only include bills with amount >= amount_min. amount_max: Only include bills with amount <= amount_max. currency_id: Convert/filter by currency id. payer_id: Only include bills paid by this member. show_disabled: Include disabled members in the output.

Returns: JSON object with stats (list of {member, balance, paid, spent, filtered_balance}), plus aggregates such as memberMonthlyStats / categoryStats depending on filters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ts_maxNo
ts_minNo
payer_idNo
amount_maxNo
amount_minNo
project_idYes
category_idNo
currency_idNo
show_disabledNo
payment_mode_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.2/5.0
Behavior3/5

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

The description clarifies that disabled members are excluded by default (show_disabled parameter) and that results vary by filters ('depending on filters'), which adds context beyond the annotations. However, the annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is already carried by structured data. The description moderately supplements it but does not go deep into optional aggregation behavior or performance implications.

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 compact and front-loaded: the core purpose and permission requirement come first, followed by parameter definitions in a list, then the return shape. Every sentence earns its place; no filler exists.

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?

The tool is complex (10 parameters), but the description covers purpose, permission, all parameter semantics, and the return shape. It relies on the output schema for full return description, which is appropriate. The minor ambiguity about currency_id behavior and some deep aggregation details are the only gaps preventing a 5.

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?

The schema has 10 parameters with 0% description coverage, so the description must compensate. It defines each parameter's meaning and filtering semantics clearly: for example, ts_min means 'Only include bills with timestamp >= ts_min (Unix seconds)', amount_max means 'Only include bills with amount <= amount_max', and currency_id means 'Convert/filter by currency id'. It falls slightly short on explaining the exact effect of currency conversion versus filtering (the wording is ambiguous) and doesn't describe the semantics of stats fields in the description, hence a 4 rather than 5.

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 states a specific verb and resource: it computes per-member spending statistics for a Cospend project. The phrase 'Per-member spending statistics' clearly differentiates it from sibling tools like list_cospend_bills, get_cospend_project, and get_cospend_project_settlement, so an agent can select it without opening other schemas.

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 the access requirement (VIEWER access) and that all filters are optional and AND-combined, which tells the agent when it is safe to call. It does not explicitly name alternative tools for cases where the agent wants raw bills or a settlement summary, so it is not quite a 5.

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