Skip to main content
Glama
Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as AttachPage.

Publish document

publish_document
Destructive

Publish a PDF, Word (.docx), PowerPoint (.pptx), Excel (.xlsx/.xls), or CSV file as a browser-viewable page, private by default. Accepts filename and base64 content, up to 4 MB decoded. Documents become readable PDFs, slides have presentation controls, and spreadsheets have searchable sheet tabs. Preserves the original for download. A siteId replaces the page at the same address. Does not send invitations.

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": {
      "filename": "<filename>",
      "content": "<content>"
    },
    "name": "publish_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugNoOptional address label, 3-40 lowercase letters, digits or hyphens. Random when omitted.
siteIdNoReplace this existing page at the same address.
contentYesBase64 file bytes, not a local path or URL.
projectNoOptional project to file the page under, by name or id from list_projects, e.g. "Q4 proposal". A new name starts that project. An empty string takes the page out of its project.
filenameYesOriginal file name with extension, e.g. proposal.docx.
siteNameNoName shown to the user and recipients, e.g. "Q3 report".
visibilityNoprivate (invitation-only, default) or public (anyone with the link).
descriptionNoOptional one-line description shown in the user's pages list. An empty string clears it.

Output Schema

NameRequiredDescriptionDefault
urlNoPage address.
siteIdNoPage id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / description
      Added value: +{
      +  "description": "Optional one-line description shown in the user's pages list. An empty string clears it.",
      +  "maxLength": 500,
      +  "type": "string"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Optional project to file the page under, by name or id from list_projects, e.g. \"Q4 proposal\". A new name starts that project. An empty string takes the page out of its project.",
      +  "maxLength": 80,
      +  "type": "string"
      +}
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations, it discloses the 4 MB decoded cap, private-by-default visibility, that the original is preserved for download, and crucially that a siteId replaces the existing page at that address — which explains the destructiveHint=true annotation rather than contradicting it. It does not cover auth requirements or what happens on partial failures.

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 verb and formats, then constraints, then the siteId replacement rule and the non-invitation caveat. The rendering sentence ('readable PDFs, slides have presentation controls, spreadsheets have searchable sheet tabs') is the most expendable part but still informs conversion behavior.

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?

For an 8-parameter, open-world write tool with an output schema already available, the description covers the essentials an agent needs: accepted inputs, size ceiling, default visibility, replacement semantics, and the boundary with notification. Missing only permission/auth expectations and error behavior.

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 coverage is 100% and every parameter is already documented, including slug format, siteId replacement, project filing, and visibility enum. The description's only genuine additions are the 4 MB limit and the file-type list tied to filename, so it sits at the baseline for a fully documented schema.

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?

Names a specific verb ('Publish') plus the exact accepted formats (PDF, .docx, .pptx, .xlsx/.xls, CSV) and the resulting artifact (browser-viewable page). The phrase 'Accepts filename and base64 content' implicitly separates it from URL-based siblings, but no sibling is named explicitly.

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?

Usage is implied rather than stated: you supply file bytes, not a URL, and the closing note 'Does not send invitations' tells the agent this is not the distribution step (that belongs to send_page/notify_recipients). There is no explicit when-to-use or named alternative, so guidance is adequate but inferential.

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.

Resources