Count Notes
count_documentsCount matching indexed notes without fetching their content, returning an exact total that ignores search result caps and counts each note once.
Instructions
Count every matching indexed note without fetching content.
The exact total is independent of search result caps and counts each note once.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Case-sensitive exact vault-relative path, including .md. | |
| query | No | FTS5 expression; blank selects all indexed notes. Malformed syntax matches its literal words. | |
| scope | No | Indexed columns to match: metadata (path, title, headings, summary), body, or all. Terms must match within one indexed section. | all |
| folder | No | Restrict to this folder and descendants; empty selects root notes. | |
| filters | No | AND equality over fields in indexed_frontmatter_fields from stats. List fields match a member; computed OKF fields use search instead. | |
| pattern | No | Case-sensitive path glob; *, ? and bracket classes are wildcards. | |
| modified_after | No | Inclusive RFC3339 modification instant with timezone. | |
| modified_before | No | Exclusive RFC3339 modification instant with timezone. | |
| 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 |
|---|---|---|---|
| total | Yes | ||
| index_stale | Yes |