upload_file
Upload a file to a specific record in PocketBase by providing the collection, record ID, file field name, file content, and file name.
Instructions
Upload a file to a record in PocketBase
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": {
"collection": "<collection>",
"recordId": "<recordId>",
"fileField": "<fileField>",
"fileContent": "<fileContent>",
"fileName": "<fileName>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection | Yes | The name or ID of the collection | |
| fileContent | Yes | The raw content of the file as a string | |
| fileField | Yes | The name of the file field in the collection schema | |
| fileName | Yes | The desired name for the uploaded file (e.g., 'report.txt') | |
| recordId | Yes | The ID of the record to attach the file to |