Get Project Structure
get_structureRetrieve the binder hierarchy of an open Scrivener project, listing folders and documents with IDs, titles, types, depths, and word counts to understand the manuscript layout and obtain document identifiers for subsequent tools.
Instructions
Return the binder hierarchy of the open project: its folders and documents in tree order, each with id, title, type, depth, and word count. Use this to understand the manuscript layout and to obtain the document ids that read_document, write_document, and the analysis tools require. By default returns a compact flat array of [id, title, type, depth, wordCount, hasChildren] tuples to save tokens; set summaryOnly for just project-level counts. Requires an open project (call open_project first).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flat | No | When true (default), return a compact flat array of [id, title, type, depth, wordCount, hasChildren] tuples. When false, return the nested tree object. | |
| folderId | No | UUID of a binder folder, as returned by get_structure. | |
| maxDepth | No | Maximum depth to descend into the binder tree, starting at 0 for top-level items. Omit to return the full hierarchy. | |
| summaryOnly | No | When true, skip the tree and return only project-level counts (documents, words) plus title and author. Default false. | |
| includeTrash | No | Set true to include trashed items in the result. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| summary | No | Project-level counts plus title and author (present when summaryOnly). | |
| documents | No | Flat list of binder items in tree order (present unless summaryOnly). | |
| structure | No | Nested binder tree (present when flat is false). |