Skip to Content
MosaicMosaicDocs
Tool Reference

CreateDocument

Create a plaintext document or a native Mosaic spreadsheet or canvas.

Starter documentation. Features and account details may differ from this deployment.

CreateDocument

Create a plaintext document or a native Mosaic spreadsheet or canvas. For a workbook use fileExtension spreadsheet, empty fileContent, and isTask false; then ReadSpreadsheet and EditSpreadsheet to populate cells, formulas and sheets. For a Canvas use fileExtension canvas, empty fileContent, and isTask false; then ReadCanvas and EditCanvas. Native documents are initialized before returning and work without an open editor. Markdown (md) content uses the same Markdown, citation and mention syntax as chat replies; other file types take raw content with no Markdown or mention tags. Images come from GenerateImage, Word documents from DuplicateItem and EditWordDocument, and decks from EditPresentation, not from this tool.

Parameters

ParameterTypeRequiredDescription
documentNamestringYesThe name of the document without the file extension
fileContentstringYesThe string content of a text document. Must be empty for a native spreadsheet or canvas.
fileExtensionstringYesThe extension of a plaintext file, or spreadsheet or canvas for a native collaborative document.
isTaskbooleanNoWhether this document is a task. Only applies to md documents.
projectIdstringNoThe id of the project (shown as a folder in the app UI) to create the document in. Requires edit access to the project. Omit to create the document at the top level of the user's files.

On this page