Serve file / directory -> public link
serve_fileHost a local file or directory and share it via a public HTTPS URL. Serve documents, images, or artifacts; remote publishing keeps the link active when the machine is off.
Instructions
Serve a local file or directory and get a public shareable URL. Pass the file or directory path to path to have it auto-hosted and tunneled. Use this when the user asks to share/serve a file, markdown document, image, or artifact. Set residency to "remote" to publish to serve's storage so the URL works with the machine off. Do not start your own static server. To expose an already-running dev server by port instead, use the serve tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | Optional duration for the link protection (e.g. 24h, 3d, 7d). | |
| name | No | Optional requested subdomain; an existing local link is reused if omitted. | |
| path | Yes | Local file or directory to serve via an auto-hosted static server. | |
| protect | No | Optional boolean; if true, enables capability token and secret code protection on the link. | |
| replace | No | When residency is remote and a published artifact occupies the requested name, true replaces the existing published artifact at that name (Pro); false returns a residency_conflict you must resolve with the user. | |
| residency | No | Residency of the served link. "local" (default) serves from the agent's machine (a tunnel); "remote" publishes the path to serve's storage so the URL stays live with the machine off. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| url | Yes | ||
| kind | No | ||
| port | No | ||
| label | Yes | ||
| usage | Yes | ||
| status | No | ||
| version | No | ||
| protected | No | ||
| residency | Yes | ||
| share_url | No | ||
| expires_at | No | ||
| label_kind | No | ||
| size_bytes | No | ||
| served_path | No | ||
| recycled_from | No | ||
| suffixed_from | No | ||
| readable_secret | No | ||
| replaced_tunnel | No |