Publish a folder
publish_dirTurns a disk folder into a live HTTPS link, serving its index.html or documents like Markdown, PDF and Word files through a reader.
Instructions
Publishes a folder from disk and returns its URL. The folder needs an index.html at its root, or documents (.md, .pdf, .docx, .xlsx, .epub), which are served through the reader.
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": {
"path": "<path>"
},
"name": "publish_dir"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path of the folder to publish. | |
| site | No | Subdomain or site id to publish over. Omit to create a new site. | |
| folder | No | Folder to file the new site in, when the person asked for one: its path of names such as Clients/Acme, or its id from list_folders. Only for a new site — do not pass it together with `site`; moving an existing site is update_site's `folder`. It never creates a folder: a folder that does not exist is refused with the list of those that do, and nothing is published. | |
| subdomain | No | Subdomain to create the new site under, when the person asked for a particular address. Only for a new site: leave it out to publish over an existing one, and do not pass it together with `site`. Ask rather than inventing one — the name is the URL somebody will be given, changing it later spends one of the few changes a site gets, and an unused site made under a guessed name has to be deleted by hand. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The live URL of the published site. | |
| files | Yes | How many files the site now serves. | |
| siteId | Yes | Identifier of the site, stable across publishes. | |
| subdomain | Yes | The site's subdomain, which is what `site` accepts. | |
| unchanged | Yes | True when every file already matched what the site served, so no new version was published. |