List Documents
list_documentsEnumerate all Markdown documents and optional attachments in a vault, using folder, glob pattern, or frontmatter filters to get a complete listing without body content.
Instructions
List documents (and optionally attachments) in the vault.
Use this to enumerate documents when you need a complete listing, not ranked search results. For finding documents by content, use 'search'. Does NOT include body content — call 'read' for full text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | No | Return only documents in this folder (e.g. "Journal"). Use folder="" for root-level (top-level) documents only. | |
| filters | No | Frontmatter equality filters, ANDed (e.g. {"tags": "craft"}); any frontmatter key works and list fields match by membership. On an OKF bundle three keys carry OKF semantics: status ("draft"/"stable"/"deprecated"; "stable" also matches notes without a status field), stale ("true"/"false" — stale_after passed), and trust_tier ("unverified"/"machine-confirmed"/"human-reviewed"). Use {"status": "deprecated"} or {"stale": "true"} to build triage listings. Any filter excludes attachments (they carry no frontmatter). | |
| pattern | No | Unix glob matched against relative paths (e.g. "Journal/*.md", "**/*meeting*.md"). | |
| include_attachments | No | When True, also returns non-.md files (PDFs, images, etc.) that match the configured allowlist. Each attachment entry includes kind="attachment" and mime_type. Default False (notes only). | |
| wait_for_pending_writes | No | When True, wait until your recent document mutations have been applied to the index before answering, so the results reflect those changes. Use it right after modifying notes when this read must see them (e.g. right after a document mutation whose effect this read should reflect). Default False answers immediately from the current index — almost always already up to date; inspect the response's ``_meta.index_stale`` field to tell whether a write was still in flight. Bounded by a server timeout (default 60s); on timeout it answers from the current index rather than waiting longer. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |