list_notes
Retrieve all notes from an Obsidian vault with an optional search filter to find specific content, enabling efficient note management and organization.
Instructions
List all notes in the vault with optional search filter (legacy with search support)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Optional search query to filter notes |
Implementation Reference
- src/index.ts:508-516 (handler)Tool dispatch handler for 'list_notes': conditionally calls searchVault if search parameter is provided, otherwise invokes the core listNotes method.case "list_notes": const searchQuery = args?.search as string; if (searchQuery) { // Use the enhanced search functionality result = await this.client.searchVault(searchQuery, ["content", "filename", "tags"]); } else { result = await this.client.listNotes(); } break;
- src/index.ts:200-202 (handler)Core handler function in ObsidianApiClient that executes the API request to retrieve the list of notes from the '/notes' endpoint.async listNotes() { return this.request("/notes"); }
- src/index.ts:410-419 (registration)Registration of the 'list_notes' tool in the MCP server's tool list, including name, description, and input schema.{ name: "list_notes", description: "List all notes in the vault with optional search filter (legacy with search support)", inputSchema: { type: "object", properties: { search: { type: "string", description: "Optional search query to filter notes" }, }, }, },
- src/index.ts:413-418 (schema)Input schema definition for the 'list_notes' tool, defining an optional 'search' string parameter.inputSchema: { type: "object", properties: { search: { type: "string", description: "Optional search query to filter notes" }, }, },