Skip to main content
Glama

Publish files you wrote

publish_files
Destructive

Publishes one or more files written here — markdown, HTML, CSS, JSON — as a site, and returns its URL. A single page goes at index.html; a single .md, .markdown or .pdf file is a site on its own, served through the documents viewer.

Instructions

Publishes one or more files written here — markdown, HTML, CSS, JSON — as a site, and returns its URL. A single page goes at index.html; a single .md, .markdown or .pdf file is a site on its own, served through the documents viewer. Text only: a PDF or an image has to be published from disk with publish_dir.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoSubdomain or site id to publish over. Omit to create a new site.
filesYesThe files to publish.
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

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so safety is covered structurally; the description adds real context: publishing over an existing site, the subdomain being permanent and un-changeable, and manual deletion of a site created under a guessed name. It stops short of stating what content is overwritten when publishing over an existing site, which is the main gap given the destructive annotation.

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?

Front-loaded with the core action and return value, then the format constraint, then the disk alternative. Every clause carries information; the final sentence is dense with several constraints packed together, which slightly reduces scanability but wastes no words.

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

Completeness5/5

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

An output schema exists so the returned URL needn't be described. Given four parameters with rich nested file objects, the description covers format eligibility, new-vs-existing site behavior, and the sibling alternative, leaving no call-blocking ambiguity.

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

Parameters4/5

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

Schema coverage is 100% and the schema descriptions are already verbose about site/folder/subdomain exclusivity, so the baseline would be 3. The description earns extra credit by explaining path semantics for the required `files` param — a single page lands at index.html, and a single .md/.markdown/.pdf becomes its own site via the documents viewer — which the schema does not convey.

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

Purpose5/5

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

States a specific verb (publishes), the resource (one or more written files), the accepted formats (markdown, HTML, CSS, JSON), and the outcome (returns the site URL). It explicitly distinguishes itself from publish_dir for text-only content, so an agent can route without opening either schema.

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

Usage Guidelines5/5

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

Explicit when-to-use and when-not: text files here, PDFs/images via publish_dir. It also names update_site for moving an existing site into a folder and warns not to pass folder/subdomain together with site, giving clear alternatives and exclusions.

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