op_add_document_attachment
Upload a file to a document by providing document ID, file name, and base64-encoded content. Requires manage_documents permission and respects instance attachment size limit.
Instructions
Upload a file to a document: the API key needs the manage_documents permission in the document's project. content is the file bytes as base64. The upload is capped at the instance's attachment size limit, read from /api/v3/configuration.
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": {
"id": "<id>",
"fileName": "<fileName>",
"content": "<content>"
},
"name": "op_add_document_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Document id to attach to. | |
| content | Yes | File bytes, base64-encoded. | |
| fileName | Yes | File name, e.g. "quarterly-report.pdf". | |
| contentType | No | MIME type. Defaults to application/octet-stream. |