List Notes By Folder
dataview.listByFolderList all notes in a specified vault folder, with optional filtering, sorting, and limit using Dataview queries.
Instructions
Convenience wrapper that runs LIST FROM "folder" (optionally with WHERE, SORT, and LIMIT clauses). Useful when you want every note under a vault folder. Requires the Dataview and Local REST API plugins.
Operates on the session-active vault (see vault.current — selectable via vault.select) unless an explicit vaultPath argument is passed, which always wins.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes | Vault-relative folder to filter by. | |
| whereClause | No | Optional DQL `WHERE` clause body (without the `WHERE` keyword). | |
| sortBy | No | Optional DQL `SORT` clause body (without the `SORT` keyword). Example: `file.ctime desc`. | |
| limit | No | Optional `LIMIT` n clause. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/schema/dataview.ts:39-46 (schema)Zod schema for the tool's input arguments: required `folder` (string) plus optional `whereClause`, `sortBy`, and `limit` via `sharedDqlFields`.
export const dataviewListByFolderArgsSchema = z .object({ folder: z.string().min(1).describe("Vault-relative folder to filter by."), ...sharedDqlFields, }) .strict() .describe('Sugar wrapper around `LIST FROM "folder"`.'); export type DataviewListByFolderArgs = z.input<typeof dataviewListByFolderArgsSchema>;