Skip to main content
Glama
splitwise-mcp

splitwise-mcp

by chrischall

sw_update_expense

Destructive

Edit an existing Splitwise expense by updating fields, replacing the full split, or attaching/replacing a receipt, with confirmation before changes are applied.

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

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 upload_id, path or base64. 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.7.0
    • changedInput schema / properties / receipt / properties / upload_id / description
      Previous value: -"The upload_id from sw_get_upload_url, after the file was PUT to its upload_url. The way to send a full-size file to the hosted server without base64."New value: +"The upload_id from sw_get_upload_url, after the file was PUT to its upload_url. The way to send a full-size file to the hosted server without base64. Single use: the upload is deleted once Splitwise has the receipt (the reply says upload_deleted); a failed or declined write keeps it, so the same upload_id can be retried."
  2. Changed4 schema fields changedv3.5.1
    • changedInput schema / properties / receipt / description
      Previous value: -"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."New value: +"Receipt to attach: PNG, JPEG, GIF or PDF, up to 10 MiB. Give exactly one of upload_id, path or base64. The type is detected from the file contents. Replaces any receipt already on the expense."
    • changedInput schema / properties / receipt / properties / base64 / description
      Previous value: -"The file bytes, base64-encoded (a data: URL prefix is accepted and stripped). The normal way to pass a receipt."New value: +"The file bytes, base64-encoded (a data: URL prefix is accepted and stripped). Costs context for every byte — on the hosted server prefer upload_id."
    • changedInput schema / properties / receipt / properties / path / description
      Previous value: -"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."New value: +"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 upload_id (or base64) there."
    • addedInput schema / properties / receipt / properties / upload_id
      Added value: +{
      +  "description": "The upload_id from sw_get_upload_url, after the file was PUT to its upload_url. The way to send a full-size file to the hosted server without base64.",
      +  "minLength": 1,
      +  "type": "string"
      +}
  3. 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"
      +}
  4. 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"
      +}
  5. 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"
  6. First observedv2.1.5

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only say readOnly=false, destructive=true, openWorld=true; the description goes well beyond that by disclosing the confirmation protocol (elicitation prompt or preview + confirmToken round-trip governed by MCP_CONFIRM_MODE) and the replace-not-merge behavior for both splits and receipts. Those are exactly the traits an agent needs to avoid a destructive surprise.

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?

Three sentences, front-loaded with purpose then the two special modes, then the confirmation behavior. The confirmation sentence is long and packs several conditions, but every clause carries information an agent would otherwise have to discover by failing a call.

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 destructive 11-parameter mutation with nested objects and no output schema, the description covers the two risky semantics (split replacement, receipt replacement) and the entire approval handshake. Nothing essential to calling it correctly and safely is absent.

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

Parameters3/5

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

Schema coverage is 55%, and the description adds real meaning for the hard cases: users is a full replacement array and receipt-only edits are a distinct mode. However, it says nothing about the bare parameters (date, details, category_id, currency_code) or how partial updates interact, so the remaining coverage gap is only partly compensated.

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

Purpose4/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') and immediately scopes the required identifier plus partial-update semantics. It also carves out a sub-mode (receipt-only attach), though it never names the sibling sw_attach_receipt, so the boundary with that tool is left to inference.

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 concrete when-conditions: custom split edits require the full users array because the API replaces the whole split, and receipt attach requires passing expense_id plus receipt alone. What's missing is routing guidance against alternatives such as sw_attach_receipt or sw_delete_expense when the intent is removal rather than edit.

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