fs_public_url
Get a public URL for a file written via fs_write. The URL is hosted on the project's subdomain at /storage/{path} and can be embedded directly as an image src, anchor href, etc. — no signing or auth. A file in a declared file collection takes its visibility from db/schema.ts: make_public on it answers FILE_VISIBILITY_DECLARED (docs({ topic: 'declared-files' })).
Files are PRIVATE by default. Asking for a public URL does NOT silently expose a private file: a private file returns an error unless you pass make_public: true to publish it. An already-public file just returns its URL. fs_signed_url gives a time-limited link to a private file WITHOUT making it world-readable.
Example:
{ "project_id": "my-saas", "path": "/uploads/users/alice/avatar.png", "make_public": true }
// Returns: { "public_url": "https://my-saas.somewhere.site/storage/uploads/users/alice/avatar.png", ... }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": {
"project_id": "<project_id>",
"path": "<path>"
},
"name": "fs_public_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Full path with leading slash | |
| project_id | Yes | Project ID (UUID), subdomain, or slug — resolved server-side, no UUID lookup needed. 'default' also works when the account has exactly one project; multi-project accounts must name one (the error lists them). | |
| make_public | No | World-readable publication flag. A private file requires true for exposure; an already-public file ignores it. Omission preserves privacy and returns an error rather than silently exposing a private file. |