get_attachment
Retrieve an attachment from a collective page by specifying collective ID, page ID, and filename. Returns content as UTF-8 text or base64, and rejects files larger than 5 MB.
Instructions
Download an attachment's contents. Returns the bytes as utf8 text or a base64 string, with the encoding stated in the result. Refuses files over 5 MB, which should be fetched from Nextcloud directly.
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": {
"collectiveId": "<collectiveId>",
"pageId": "<pageId>",
"filename": "<filename>"
},
"name": "get_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | ||
| encoding | No | How to return the content. If omitted it is inferred from the stored MIME type: textual types as utf8, everything else as base64. | |
| filename | Yes | Attachment filename from list_attachments. | |
| collectiveId | Yes |