sw_get_upload_url
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
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Name of the file, e.g. "receipt.jpg" | |
| content_type | Yes | The file's type: image/png, image/jpeg, image/gif or application/pdf. The upload must send exactly this Content-Type. |