Skip to main content

publish_document

Publish a new document or update an existing one.

Parameters

ParameterTypeRequiredDescription
titlestringYesDocument title
htmlstringYesFull HTML content of the document
document_iduuidNoExisting document ID to update. Omit to create new.
notestringNoVersion note / changelog entry

Returns

FieldTypeDescription
document_iduuidUnique identifier for the document
version_iduuidIdentifier for this specific version

Examples

Create a new document

Tool call: publish_document
  title: "Q3 Sales Proposal — Acme Corp"
  html: "<!DOCTYPE html><html>...</html>"
  note: "Initial draft"

Update an existing document

Tool call: publish_document
  title: "Q3 Sales Proposal — Acme Corp"
  html: "<!DOCTYPE html><html>...</html>"
  document_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  note: "Updated pricing section per client feedback"
The html parameter must be a complete HTML document — include <!DOCTYPE html>, <head>, and <body> as appropriate for your content.

Important notes

  • Omit document_id to create a new document. Include it to update an existing one.
  • Save the document_id returned on creation — you need it for future updates via MCP or when you instruct the model explicitly.
  • Version notes are optional but recommended — they appear in your version history in the dashboard.

Updating a document