Request File Upload
request-file-uploadStep 1 of attaching a file to a memo. Returns a short-lived upload ticket ({ file_id, upload: { url, token }, max_size, expires_in }). The file BYTES are uploaded over plain HTTP straight to storage — they must NOT pass through this tool or the model context (never base64 the file into a tool argument). Flow: (1) call this with the target memo_id and the file's content_type; (2) HTTP POST to upload.url as multipart/form-data with exactly two fields — token set to upload.token, and file containing the bytes (read the file FROM DISK, e.g. curl -F "token=<token>" -F "file=@/path/to/file" <url>; size between 1 and max_size); (3) call confirm-file-upload with the same memo_id and file_id to record the file on the memo. Only text, media, PDF and office documents are accepted (text/, image/, audio/, video/, application/pdf, Word/Excel/PowerPoint, OpenDocument), up to max_size bytes (the per-file cap of the memo owner's plan). The ticket expires in ~15 min. If the byte upload fails because the network sandbox blocks it, the host shown in upload.url must be on the client's network allowlist — surface that exact host to the user to allow (in Claude Code it is also offered for one-click approval on first use); if it cannot be allowlisted (e.g. plain chat clients), hand the user the ready-to-run curl command so they upload it themselves from an unsandboxed terminal. Requires write access to the memo (its private owner, or a member of its project).
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": {
"memo_id": "<memo_id>",
"content_type": "<content_type>"
},
"name": "request-file-upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| memo_id | Yes | Id of the memo to attach the file to | |
| content_type | Yes | MIME type of the file you will upload. Only TEXT, MEDIA, PDF and OFFICE documents are allowed: text/* (e.g. text/plain, text/markdown, text/csv), image/*, audio/*, video/*, application/pdf, and Word/Excel/PowerPoint (OOXML + legacy) / OpenDocument — anything else is rejected. The upload token locks the stored file to this exact type. |