Compile Documents
compile_documentsCombine binder documents into a single manuscript in text, markdown, or HTML. Use standard mode for binder-order compilation or intelligent mode with AI optimization for specific targets.
Instructions
Compile the project's documents into a single continuous manuscript in the requested format and return the compiled text (large results are spooled to a file reference). In "standard" mode it joins documents in binder order; in "intelligent" mode it uses AI to optimize the output for a specific target such as an agent query or synopsis. To write a manuscript to disk in a publishing format (EPUB, etc.) use export_project instead. Requires an open project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "standard" (default) joins documents in order; "intelligent" applies AI optimization toward targetOptimization. | |
| format | No | Output format of the compiled manuscript. Default "text". | |
| separator | No | Text inserted between documents in the standard-mode fallback. Default "\n\n---\n\n". | |
| documentIds | No | Optional explicit list of document ids to compile, in order. Overrides rootFolderId when provided; most useful with mode "intelligent". | |
| hierarchical | No | Preserve the binder folder hierarchy as headings. Default false. | |
| includeNotes | No | Include each document's notes in the output. Default false. | |
| rootFolderId | No | Optional binder folder id to compile only its descendants. Omit to compile all text documents. | |
| includeSynopsis | No | Include each document's synopsis in the output. Default false. | |
| targetOptimization | No | For mode "intelligent": what to optimize the compiled output for. Default "general". |