Get file URL
get_file_urlGenerate public URLs for PocketBase file fields, supporting thumbnails, forced downloads, and short-lived access tokens for protected files.
Instructions
Build the public URL for a file stored in a record's file field. For image files you may request a thumbnail via thumb (e.g. '100x100', '100x100t', '0x100'). For protected files (collection with a non-public file field), set protected to true to embed a short-lived access token.
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>",
"filename": "<filename>"
},
"name": "get_file_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thumb | No | Thumbnail size, e.g. '100x100', '0x100', '100x100t'. | |
| download | No | Force a download (Content-Disposition attachment). | |
| filename | Yes | Stored file name (the value of the file field). | |
| recordId | Yes | Record id. | |
| protected | No | Embed a file access token for protected files. | |
| collection | Yes | Collection id or name. |