Skip to main content
Glama
chrischall

splitwise-mcp

by chrischall

sw_get_receipt

Download the receipt attached to a Splitwise expense as an image, PDF, or extracted text. Use this tool instead of direct receipt URLs, which return 401 unauthorized.

Instructions

Download the receipt image or PDF attached to a Splitwise expense. The receipt URLs returned by sw_get_expense need the server's credentials — fetching them directly returns 401 — so use this tool instead. Set inline:true to get the bytes back in the result (images AND PDFs), or extract_text:true to get a PDF's text without the binary at all — both work when the caller can't see this server's filesystem. It also writes the file and returns the path, unless write:false or the filesystem is read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesExpense ID (the same id sw_get_expense takes)
sizeNoWhich stored rendition to fetch. Defaults to 'original' (full quality, and the only one a PDF receipt has). Falls back to the other rendition when the requested one is absent.
writeNoWrite the receipt to disk. Defaults to true. Pass false when the caller cannot reach this server's filesystem, or when the server runs read-only.
inlineNoReturn the receipt bytes in the result — an image block for images, an embedded resource for PDFs and everything else. Only for receipts under 4194304 bytes.
output_dirNoDirectory to write the receipt into. Defaults to $SPLITWISE_OUTPUT_DIR, else the current working directory. When SPLITWISE_OUTPUT_DIR is set, this must be inside it.
extract_textNoAlso return the PDF's text layer as `text`. Ideal for looking up line items or totals without transferring the file. PDFs only; a scanned receipt has no text layer to extract.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.2.1
    • changedInput schema / properties / output_dir / description
      Previous value: -"Directory to write the receipt into. Defaults to $SPLITWISE_OUTPUT_DIR, else the current working directory."New value: +"Directory to write the receipt into. Defaults to $SPLITWISE_OUTPUT_DIR, else the current working directory. When SPLITWISE_OUTPUT_DIR is set, this must be inside it."
  2. 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"
  3. Addedv2.2.3

TDQS

A4.8/5.0
Behavior5/5

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

The description adds significant behavioral context beyond the annotations: it discloses the 401 auth issue, the file-writing side effect, the read-only fallback, the 4MB inline limit, and PDF text extraction behavior. It does not contradict readOnlyHint=false or destructiveHint=false.

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 four sentences with no filler. The core action is front-loaded, followed by the 401 caveat, mode options, and write behavior. Each sentence earns its place with operational information.

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 a 6-parameter tool with no output schema, the description covers the main return channels (file path, inline bytes, extracted text), the key failure mode (401 on direct URL fetch), and filesystem constraints. It does not specify edge cases like missing receipts or the exact response envelope, but the schema handles remaining parameter details.

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%, so the baseline is 3. The description adds meaningful semantics to inline, extract_text, and write by explaining their practical use cases and the returned path. However, size and output_dir are still primarily explained by the schema rather than the description.

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: 'Download the receipt image or PDF attached to a Splitwise expense.' It also distinguishes itself from sibling sw_get_expense by explaining that the receipt URLs returned by sw_get_expense require server credentials and this tool should be used instead.

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

Usage Guidelines5/5

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

It explicitly tells the agent to use this tool rather than fetching receipt URLs directly, because those URLs return 401 without server credentials. It also gives conditional guidance for inline:true, extract_text:true, and write:false, covering the key decision of whether the caller can access the server's filesystem.

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