Skip to main content
Glama
splitwise-mcp

splitwise-mcp

by chrischall

sw_get_upload_url

Read-only

Get a short-lived signed URL to upload a receipt file, then use its upload_id to attach the receipt to Splitwise expenses without sending file bytes in the tool call.

Instructions

Get a short-lived (~10 min) signed URL to upload a receipt file (PNG, JPEG, GIF or PDF, up to 10 MiB) to this server WITHOUT putting its bytes in a tool call: run the returned curl command from a shell or sandbox that has the file and network access to the URL's host, then pass receipt: {upload_id, filename} to sw_attach_receipt, sw_create_expense or sw_update_expense. Send the original file — no need to shrink it. The upload is deleted from this server once the receipt is attached (a failed write keeps it for a retry), so each upload_id is used once. Only on the hosted server; locally use receipt.path. If you have no shell that can reach the URL, use receipt.base64 instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "filename": "<filename>",
      "content_type": "<content_type>"
    },
    "name": "sw_get_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesName of the file, e.g. "receipt.jpg"
content_typeYesThe file's type: image/png, image/jpeg, image/gif or application/pdf. The upload must send exactly this Content-Type.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.5.1

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations by disclosing the ~10 minute lifetime, supported file types and size limit, single-use upload_id behavior, deletion after attachment, retry-on-failed-write behavior, hosted-only availability, and the no-bytes-in-tool-call constraint.

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?

Dense but front-loaded: the primary action, lifetime, constraints, and downstream usage appear early. It is longer than typical but most sentences carry operational information, though slight compression could improve readability.

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?

Complete for a tool that returns a signed URL rather than an output schema. It covers environment constraints, file constraints, lifecycle behavior, downstream integration, and fallback paths, leaving no significant operational gap.

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 100%, so filename and content_type are already documented. The description reinforces the original-file and exact-Content-Type requirements but does not add substantial new parameter-level detail beyond the schema.

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?

States a specific verb and resource: getting a short-lived signed upload URL for a receipt file. It clearly distinguishes this preparatory step from sibling tools like sw_attach_receipt, sw_create_expense, and sw_update_expense, which consume the resulting upload_id.

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?

Explicitly explains when to use this tool, how to use the returned URL via curl, and when to choose alternatives: receipt.path locally or receipt.base64 if no reachable shell exists. It also routes the result into the correct downstream tools.

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