Skip to main content
Glama

Publish a folder

publish_dir
Destructive

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.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path of the folder to publish.
siteNoSubdomain or site id to publish over. Omit to create a new site.
folderNoFolder 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.
subdomainNoSubdomain 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, it cannot be changed afterwards, and an unused site made under a guessed name has to be deleted by hand.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe live URL of the published site.
filesYesHow many files the site now serves.
siteIdYesIdentifier of the site, stable across publishes.
subdomainYesThe site's subdomain, which is what `site` accepts.
unchangedYesTrue when every file already matched what the site served, so no new version was published.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.5
    • changedInput schema / properties / folder / description
      Previous value: -"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 done in the dashboard. It never creates a folder: a folder that does not exist is refused with the list of those that do, and nothing is published."New value: +"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."
  2. Changed2 schema fields changedv0.2.4
    • addedInput schema / properties / folder
      Added value: +{
      +  "description": "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 done in the dashboard. It never creates a folder: a folder that does not exist is refused with the list of those that do, and nothing is published.",
      +  "type": "string"
      +}
    • addedInput schema / properties / subdomain
      Added value: +{
      +  "description": "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, it cannot be changed afterwards, and an unused site made under a guessed name has to be deleted by hand.",
      +  "type": "string"
      +}
  3. Changed1 schema field changedv0.2.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "files": {
      +      "description": "How many files the site now serves.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "siteId": {
      +      "description": "Identifier of the site, stable across publishes.",
      +      "type": "string"
      +    },
      +    "subdomain": {
      +      "description": "The site's subdomain, which is what `site` accepts.",
      +      "type": "string"
      +    },
      +    "unchanged": {
      +      "description": "True when every file already matched what the site served, so no new version was published.",
      +      "type": "boolean"
      +    },
      +    "url": {
      +      "description": "The live URL of the published site.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "url",
      +    "siteId",
      +    "subdomain",
      +    "files",
      +    "unchanged"
      +  ],
      +  "type": "object"
      +}
  4. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, readOnlyHint=false, non-idempotent and open-world, so the safety profile is covered; the description usefully adds the return value and the index.html/document serving rule. It does not disclose the destructive case itself — what happens to existing content when publishing over a site — which is the behavior an agent most needs to know before invoking a destructive publish.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, with the core action and the return value front-loaded and the content precondition following. Slightly denser structuring (e.g. separating the requirement clause) could improve scanability, but every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description states the action, the return (URL), and the content requirement, and the output schema plus 100%-covered parameter docs carry the rest, including the new-site-vs-existing-site decision. Given the destructive annotation, a brief note on overwrite behavior and the publish_files alternative would close the remaining gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the parameter docs are unusually rich (including the site-vs-subdomain mutual exclusion and the folder lookup warning). The description adds only the "from disk" framing for `path` and says nothing about `site`, `folder`, or `subdomain`, so the baseline 3 for fully documented schemas applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a precise verb+resource ("Publishes a folder from disk and returns its URL") plus the content precondition, so the agent knows exactly what is published and what comes back. It does not, however, distinguish itself from the sibling publish_files, leaving the agent to infer which of the two publish tools fits the request.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The content requirement ("needs an index.html at its root, or documents...") is a real precondition and doubles as implied usage guidance for when the tool will succeed. But there is no when-to-use/when-not guidance and no mention of publish_files as the alternative path, so routing between siblings remains inferred rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.