Skip to main content
Glama

Publish files you wrote

publish_files
Destructive

Publishes Markdown, HTML, CSS, or JSON files as a static site and returns its live URL; use it for text-based files written in chat.

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.

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.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"
      +}
  2. 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 the safety profile is partly covered; the description adds real behavioral context — the returned URL, the text-only content constraint, and how single files are served through the documents viewer. It does not, however, disclose what happens when publishing over an existing site id (overwrite vs. merge), which is the main risk implied by destructiveHint.

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

Conciseness5/5

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

Three sentences, front-loaded with the action and return value, then routing rules, then the hard exclusion. No filler, and each sentence carries distinct information.

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?

An output schema exists so return values need not be explained, and the description covers content-type limits and the sibling handoff well. The remaining gap is the behavior of republishing onto an existing site, which matters for a tool flagged destructive.

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%, so baseline is 3, but the description goes beyond the schema by explaining how paths map to pages (a single page at index.html; a lone .md/.markdown/.pdf becomes its own site). It adds little about the `site` parameter beyond what the schema already says.

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 and resource ('Publishes one or more files written here ... as a site, and returns its URL') and immediately differentiates itself from the sibling publish_dir by naming what it cannot handle. An agent can distinguish this from publish_dir and delete_site without opening any 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?

Explicitly routes the agent: files written in this session go here, while 'a PDF or an image has to be published from disk with publish_dir.' It also names the alternative tool and the exact condition that selects it, leaving nothing to inference.

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