Upload a small document
The upload_document MCP tool: upload a small document.
upload_document · writes
MCP only (no REST operation).
What the model reads
Uploads a small file you have in hand to a trip's documents, in one call — a CSV or a text you wrote, or a small image. Pass text (for text/plain or text/csv) or contentBase64 (any accepted type) — exactly one, at most 512 KB. It lands internal (visibility: staff) unless you release it with visibility: traveler, optionally into a folder. For a file on the user's computer, use upload_file when it is offered. undo_change deletes it again.
Permissions: documents:write. Undo: the result names a change id; undo_change reverts it.
Input
| Field | Type | Required | Description |
|---|---|---|---|
tripId |
uuid | yes | |
name |
string | yes | The name shown in bymundi, with its extension (e.g. 'Kyoto hotel voucher.pdf'). max 200 chars |
mimeType |
"application/pdf" | "image/png" | "image/jpeg" | "image/webp" | "image/gif" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "text/plain" | "text/csv" | "application/zip" | yes | The file's type — only these are accepted. |
text |
string | The file's content, for text/plain or text/csv. max 524288 chars | |
contentBase64 |
string | The file's bytes in base64, for any accepted type. Send exactly one of text / contentBase64; at most 512 KB once decoded. max 700076 chars |
|
visibility |
"staff" | "traveler" | staff (the default) keeps it internal; traveler releases it to the trip's travelers. default "staff" |
|
folderId |
uuid | null | File it in this folder of the trip; null or absent = loose. |
Input schema (JSON)
{
"type": "object",
"properties": {
"tripId": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "The name shown in bymundi, with its extension (e.g. 'Kyoto hotel voucher.pdf')."
},
"mimeType": {
"type": "string",
"enum": [
"application/pdf",
"image/png",
"image/jpeg",
"image/webp",
"image/gif",
"application/msword",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.ms-excel",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.ms-powerpoint",
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"text/plain",
"text/csv",
"application/zip"
],
"description": "The file's type — only these are accepted."
},
"text": {
"type": "string",
"maxLength": 524288,
"description": "The file's content, for text/plain or text/csv."
},
"contentBase64": {
"type": "string",
"maxLength": 700076,
"description": "The file's bytes in base64, for any accepted type. Send exactly one of `text` / `contentBase64`; at most 512 KB once decoded."
},
"visibility": {
"type": "string",
"enum": [
"staff",
"traveler"
],
"default": "staff",
"description": "`staff` (the default) keeps it internal; `traveler` releases it to the trip's travelers."
},
"folderId": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"description": "File it in this folder of the trip; null or absent = loose."
}
},
"required": [
"tripId",
"name",
"mimeType"
],
"additionalProperties": false
}