Upload document
Upload a receipt, bill or sales invoice to the Costs or Sales inbox.
MCP tool dext_write → upload_document
write
Uploads one file through Add documents and returns the new item in Processing. Images and PDFs may be up to 6MB, ZIP files 100MB. Mode one_per_file takes PDF, JPG, PNG or ZIP; one_per_page and auto_split take PDF only. The upload reaches no one and the item can be archived, so it runs without asking.
Parameters
| Name | Type | Description |
|---|---|---|
| inbox enum | enum | costs or sales. Default: costs. |
| file_url string required | string | HTTPS link to the file Cotlet downloads. |
| document_owner string | string | Owner ID from list_document_owners, or none. Default: none. |
| mode enum | enum | one_per_file, one_per_page or auto_split. Default: one_per_file. |
tools/call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "dext_write",
"arguments": {
"operation": "upload_document",
"arguments": {
"inbox": "costs",
"file_url": "https://files.example.com/receipts/office-supplies-0412.pdf",
"document_owner": "Dana Reyes",
"mode": "one_per_file"
}
}
}
} Example response
{
"content": [
{
"type": "text",
"text": "{ ... same JSON as structuredContent ... }"
}
],
"structuredContent": {
"item_id": "it_7f3b02",
"inbox": "costs",
"status": "processing",
"document_owner": "Dana Reyes"
},
"isError": false
}