Update a document
The update_document MCP tool: update a document.
update_document · writes · idempotent
REST: PATCH /v1/documents/{documentId}
What the model reads
Renames a document, releases it to the trip's travelers (visibility: traveler) or takes it back to internal (staff), or files it in another folder (folderId, null = loose) — the Documents tab's Make visible, Back to internal and Move to folder, in one call. Travelers see a released document only while the trip is published. undo_change reverts it.
Permissions: documents:write. Undo: the result names a change id; undo_change reverts it.
Input
| Field | Type | Required | Description |
|---|---|---|---|
documentId |
uuid | yes | |
name |
string | The name shown in bymundi, with its extension (e.g. 'Kyoto hotel voucher.pdf'). max 200 chars | |
visibility |
"staff" | "traveler" | ||
folderId |
uuid | null | A folder of the same trip; null = loose (in no folder). | |
expectedUpdatedAt |
datetime | The document's updatedAt as you read it. |
Input schema (JSON)
{
"type": "object",
"properties": {
"documentId": {
"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')."
},
"visibility": {
"type": "string",
"enum": [
"staff",
"traveler"
]
},
"folderId": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
],
"description": "A folder of the same trip; null = loose (in no folder)."
},
"expectedUpdatedAt": {
"type": "string",
"format": "date-time",
"description": "The document's `updatedAt` as you read it."
}
},
"required": [
"documentId"
],
"additionalProperties": false
}