Skip to main content
Glama
SaharshPatel24

splitwise-mcp

get_expenses

Retrieve and filter Splitwise expenses by group, friend, or date range to view costs, payments, and splits.

Instructions

List Splitwise expenses. Filter by group, friend, date range, or limit. Returns cost, description, date, who paid, and splits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_idNoFilter by group ID
friend_idNoFilter by friend ID
dated_afterNoISO date e.g. 2025-01-01
dated_beforeNoISO date e.g. 2025-01-31
limitNoMax results (default 20)
offsetNoPagination offset

Implementation Reference

  • The handler implementation for the get_expenses tool, which calls client.getExpenses and filters out deleted expenses.
    handler: async (args: {
      group_id?: number;
      friend_id?: number;
      dated_after?: string;
      dated_before?: string;
      limit?: number;
      offset?: number;
    }) => {
      const expenses = await client.getExpenses(args);
      return expenses.filter((e) => !e.deleted_at);
    },
  • The Zod input schema defining the arguments for the get_expenses tool.
    inputSchema: z.object({
      group_id: z.number().int().optional().describe('Filter by group ID'),
      friend_id: z.number().int().optional().describe('Filter by friend ID'),
      dated_after: z.string().optional().describe('ISO date e.g. 2025-01-01'),
      dated_before: z.string().optional().describe('ISO date e.g. 2025-01-31'),
      limit: z.number().int().min(1).max(100).optional().describe('Max results (default 20)'),
      offset: z.number().int().min(0).optional().describe('Pagination offset'),
    }),
  • The registration of the get_expenses tool within the expenseTools array.
    {
      name: 'get_expenses',
      description:
        'List Splitwise expenses. Filter by group, friend, date range, or limit. Returns cost, description, date, who paid, and splits.',
      inputSchema: z.object({
        group_id: z.number().int().optional().describe('Filter by group ID'),
        friend_id: z.number().int().optional().describe('Filter by friend ID'),
        dated_after: z.string().optional().describe('ISO date e.g. 2025-01-01'),
        dated_before: z.string().optional().describe('ISO date e.g. 2025-01-31'),
        limit: z.number().int().min(1).max(100).optional().describe('Max results (default 20)'),
        offset: z.number().int().min(0).optional().describe('Pagination offset'),
      }),
      handler: async (args: {
        group_id?: number;
        friend_id?: number;
        dated_after?: string;
        dated_before?: string;
        limit?: number;
        offset?: number;
      }) => {
        const expenses = await client.getExpenses(args);
        return expenses.filter((e) => !e.deleted_at);
      },
    },
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses return value structure ('cost, description, date, who paid, and splits') which substitutes for missing output schema. Omits auth requirements and rate limits but covers essential read-operation behavior.

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 with zero waste: purpose declaration, filtering capabilities, and return values. Perfectly front-loaded and appropriately sized for complexity.

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?

Complete for a list operation with 100% schema coverage. Return values documented in lieu of output schema. Minor gap: does not explicitly describe pagination behavior (offset param in schema but not mentioned in description).

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 coverage is 100%, establishing baseline 3. Description adds value by semantically grouping parameters as filters ('Filter by group, friend, date range, or limit'), clarifying their purpose beyond raw schema definitions.

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?

Clear specific verb ('List') + resource ('Splitwise expenses') + scope. Plural 'expenses' and filtering description distinguish from sibling get_expense (singular) and clearly contrast with create/delete mutations.

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

Usage Guidelines3/5

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

Provides implied usage through filtering examples but does not explicitly differentiate when to use this vs get_expense (single fetch) or contrast with mutating siblings. No 'when-not' guidance provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SaharshPatel24/splitwise-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server