Skip to main content
Glama
chrischall

splitwise-mcp

by chrischall

sw_update_expense

Destructive

Edit an existing Splitwise expense. Provide expense_id and any fields to change. For custom split updates, the full users array must be provided (the API replaces the entire split).

Instructions

Edit an existing Splitwise expense. Provide expense_id and any fields to change. For custom split updates, the full users array must be provided (the API replaces the entire split). To attach or replace the receipt on an existing expense, pass expense_id and receipt alone. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call returns a preview and a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
costNoDecimal string, e.g. "25.00"
dateNo
usersNoFull replacement split — all users must be included. Mutually exclusive with split_equally.
detailsNo
receiptNoReceipt to attach: PNG, JPEG, GIF or PDF, up to 10 MiB. Give exactly one of base64 or path. The type is detected from the file contents. Replaces any receipt already on the expense.
expense_idYesID of the expense to update
category_idNo
descriptionNo
confirmTokenNoONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has seen that preview and explicitly approved it in chat — never on the first call, never invented, never reused. Call again with the same arguments. Ignored when the client supports elicitation.
currency_codeNo
split_equallyNoMutually exclusive with users

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.4.0
    • addedInput schema / properties / receipt
      Added value: +{
      +  "description": "Receipt to attach: PNG, JPEG, GIF or PDF, up to 10 MiB. Give exactly one of base64 or path. The type is detected from the file contents. Replaces any receipt already on the expense.",
      +  "properties": {
      +    "base64": {
      +      "description": "The file bytes, base64-encoded (a data: URL prefix is accepted and stripped). The normal way to pass a receipt.",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "filename": {
      +      "description": "Name to store the file under, e.g. \"receipt.pdf\".",
      +      "maxLength": 200,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "description": "Optional. If given, it must match the type detected from the file contents.",
      +      "type": "string"
      +    },
      +    "path": {
      +      "description": "A file inside SPLITWISE_INPUT_DIR on the machine running this server (relative to it, or absolute). Only works when that variable is set — never on a hosted server; use base64 there.",
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "filename"
      +  ],
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv3.2.0
    • removedInput schema / properties / confirm
      Removed value: -{
      -  "description": "Must be true to proceed. Without this, the tool returns a preview.",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / confirmToken
      Added value: +{
      +  "description": "ONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 \"confirmation-required\" response, passed back ONLY after the user has seen that preview and explicitly approved it in chat — never on the first call, never invented, never reused. Call again with the same arguments. Ignored when the client supports elicitation.",
      +  "type": "string"
      +}
  3. Changed1 schema field changedv3.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  4. First observedv2.1.5

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructive and openWorld, but the description adds substantial non-obvious behavior: the full users array replaces the entire split, a receipt-only call replaces any existing receipt, and — critically — the two-phase confirmation protocol with preview and confirmToken that governs whether the mutation actually executes. This is exactly the kind of context annotations cannot convey.

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

Conciseness4/5

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

Front-loaded with the core action, then ordered by increasing specificity: field editing, split semantics, receipt handling, confirmation flow. Every sentence carries information, though the confirmation sentence is dense and could be split for readability.

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 an 11-parameter mutation tool with no output schema, the description covers the risky areas well, including the shape of the confirmation-required response (preview + confirmToken), which substitutes for missing output documentation. It does not address permission requirements or error behavior, leaving a small gap.

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 only 55%, and the description compensates on the highest-risk parameters: it states that any subset of fields may be changed, that users must be provided in full, that receipt alone is a valid receipt-replacement call, and that confirmToken is only for the fallback path. Lesser parameters (cost, date, category_id, currency_code, description, details) get nothing beyond the thin schema, hence not a 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?

Opens with a specific verb+resource: 'Edit an existing Splitwise expense.' An agent can immediately distinguish this from sw_create_expense and sw_delete_expense without inspecting the schema, and the following sentences clarify the fields and special cases (receipt, splits).

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?

Gives clear when-to-use context for the main path and for two special paths (custom split replacement and receipt-only updates), which is real routing guidance. However, it never mentions the sibling sw_attach_receipt, which an agent might reasonably prefer for receipt attachment, so the alternative-selection guidance is incomplete.

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