Table of Contents
get_tocRetrieve the heading outline of a Markdown note or all notes in a folder, with optional heading-depth and note limits.
Instructions
Return the heading outline of a note, or of every note under a folder.
For a note: a list of {heading, level}, the title first as level 1. For a folder: {path, notes, truncated}, each note with its path, title and headings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | A note path ending in .md, such as `"a/b.md"`, or a folder, such as `"a/b"`. | |
| max_level | No | Deepest heading level to keep, such as 2 for H1 and H2; omit for all. The title always stays. | |
| max_notes | No | Folders only: notes to include, first by path (default 200); truncated is true when more exist. | |
| wait_for_pending_writes | No | Wait for recent index writes. On timeout, answer from the current index with _meta.index_stale=true. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |