Create attachment
create_attachmentCreate a new attachment — a record in the sfiles table plus the stored file — and return its id. To attach the file to a record, write the returned id into a File or Image column with write_data; every attachment id must be referenced by exactly one record and column, never reuse it elsewhere. Existing attachments cannot be modified — create a new one and update the referencing column instead. Provide the content either as text (stored as UTF-8) or as base64, never both.
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": {
"filename": "<filename>"
},
"name": "create_attachment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | No | Text content of the file, stored as UTF-8 with a byte order mark. Use for text formats (txt, csv, json, xml, html, svg, ...). | |
| filename | Yes | File name including the extension, e.g. report.pdf. The extension determines the stored content type. | |
| content_base64 | No | Base64-encoded binary content of the file. Use for binary formats (images, pdf, office documents, ...). |