Export Docmost pages to a file
export_pagesExport Docmost pages or entire spaces as Markdown or HTML files, or as .zip archives with subpages and attachments. Saves to a local path and returns the file location and size.
Instructions
Saves a page as a Markdown or HTML file, or as a .zip when it includes subpages or attachments, or every page of a space as a .zip, which needs space admin rights, to a path on the machine running this server and returns the path and size.
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": {
"format": "<format>",
"outputPath": "<outputPath>"
},
"name": "export_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | Yes | File format of the exported pages. | |
| pageId | No | The page to export; give this or spaceId. | |
| spaceId | No | Space id from get_workspace, to export the whole space. | |
| overwrite | No | Replace an existing file at that path; defaults to false. | |
| outputPath | Yes | File path on the machine running this server, or an existing folder to save under Docmost's file name; ~ means the home directory. | |
| includeChildren | No | Include a page's subpages, which makes a .zip; defaults to false. | |
| includeAttachments | No | Include images and attached files, which makes a .zip; defaults to false. |