Skip to main content
Glama

Publish a multi-file site

publish_files
DestructiveIdempotent

Publishes several files at once to an existing site (use create_site first for a new one). Send index.html plus any other files: css/style.css, js/app.js, about.html, images or fonts. index.html becomes the page (previous version kept in history); other HTML pages (about.html, offer/prices.html) are published at the site root with clean addresses (/about); all other files go to assets/ with their folders kept, and relative links are rewritten automatically, so write normal relative paths like "css/style.css" and "about.html". Text files: put the code in content. Binary files (png, jpg, webp, woff2…): content is base64 and encoding is "base64". Omit index.html to only add or replace files. Limits: 300 files, 10 MB per file, 20 MB in total, the account storage limit. Allowed: html, css, js, json, images (jpg, png, gif, svg, webp, avif, ico), fonts (woff, woff2, ttf, otf), txt, xml, pdf. Use dry_run=true to preview.

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": {
      "site": "<site>",
      "files": "<files>"
    },
    "name": "publish_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesSite id or name, e.g. "my-portfolio" or "my-portfolio.hostilo.page" (from list_sites).
filesYesFiles to publish.
dry_runNoOnly report what would be published; nothing is changed.
clear_assetsNoDelete all current files in assets/ before publishing.
expected_versionNoOptional: the version from get_site. If the site was saved by someone else since then, nothing is published and you get a version_conflict error (get the site again and merge).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / site / description
      Previous value: -"Site id or name, e.g. \"my-portfolio\" or \"my-portfolio.hostilo.app\" (from list_sites)."New value: +"Site id or name, e.g. \"my-portfolio\" or \"my-portfolio.hostilo.page\" (from list_sites)."
  2. Changed1 schema field changed
    • addedInput schema / properties / expected_version
      Added value: +{
      +  "description": "Optional: the version from get_site. If the site was saved by someone else since then, nothing is published and you get a version_conflict error (get the site again and merge).",
      +  "type": "string"
      +}
  3. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the destructiveHint/idempotentHint annotations, it discloses concrete consequences: index.html becomes the page with the previous version kept in history, other HTML is remapped to clean root URLs, remaining files are relocated under assets/ with links rewritten automatically. It also enumerates hard limits (300 files, 10 MB/file, 20 MB total, storage cap) and the allowed file-type set, none of which the annotations convey.

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, prerequisite, and publishing model, then limitations and encoding rules. It is a dense run-on paragraph with some redundancy around HTML paths, but nearly every sentence carries operational information.

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?

For a destructive, open-world multi-file mutation, it covers prerequisites, path semantics, encoding, size/type limits, history retention, and the version_conflict failure mode. Little an agent needs to call it correctly is missing; return format isn't described but no output schema exists and the outcome is explained behaviorally.

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 would be 3, but the description adds real meaning on top: how nested paths are interpreted and rewritten, and that binary content must be base64 with encoding="base64". It does not mention clear_assets at all, though the schema documents it well.

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 several files at once to an existing site") and immediately distinguishes itself from create_site for new sites. The scope (multi-file publish into an existing site) is unambiguous versus siblings like update_site or import_zip.

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?

Gives explicit routing ("use create_site first for a new one"), an alternative mode ("Omit index.html to only add or replace files"), and a safe-preview path ("Use dry_run=true to preview"). The agent knows when this tool is the right choice and how to vary its behavior.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.