Skip to main content
Glama
aliasunder

Vault Cortex Obsidian MCP Server

List Files

vault_list_files
Read-onlyIdempotent

Lists non-markdown files in an Obsidian vault or folder—images, PDFs, canvases, data—with byte sizes and extension counts for discovery before reading.

Instructions

List non-markdown files in the vault or a folder — images, canvases, PDFs, data files — with per-file byte sizes and per-extension counts.

Example: vault_list_files({}) — every non-markdown file in the vault Example: vault_list_files({ folder: "attachments" }) Example: vault_list_files({ extensions: [".png", ".jpg"], limit: 20 })

When to use: discovering what files exist before reading them with vault_read_file. vault_list_notes and vault_search_by_folder cover only markdown notes, and beyond notes vault_search indexes only canvas, PDF, and text-format files, so this is the discovery surface for everything else. For the files one specific note links to, prefer vault_get_outgoing_links.

Behavior: Reads the filesystem rather than the search index, so use the folder's exact letter case; on a case-sensitive filesystem a different case finds nothing.

Errors:

  • A visible folder containing no files — or one that doesn't exist — returns an empty listing, not an error.

  • "absolute path blocked" / "path traversal blocked" / "hidden path blocked" — the folder starts at the filesystem root, escapes the vault (e.g. "../elsewhere") or names the vault root itself (e.g. "."), or is hidden like ".obsidian" (hidden folders are not listable, matching Obsidian); use a vault-relative folder outside hidden folders, and omit folder to list the whole vault.

Returns: JSON with files (array of { path, extension, bytes }, sorted by path; extension is "(none)" for a file without one), extension_counts (per-extension totals over the full filtered set), total (full filtered count), and truncated (true when total exceeds limit). bytes is the on-disk file size, not the delivery cost: reading an image via vault_read_file returns a copy shrunk to fit when needed, so a large listed image is still cheap to read. Text formats return verbatim, so their listed size is what a read delivers; one over 100 KiB must be read in windows with vault_read_file's start_line and limit. Only supported types are readable via vault_read_file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax entries returned (default 50).
folderNoFolder path to search recursively (e.g. "attachments" or "Projects/media"). Omit to list the whole vault.
extensionsNoOnly include these extensions, case-insensitive, leading dot optional (e.g. [".png", "jpg"]).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.54.9
    • addedInput schema / properties / extensions / minItems
      Added value: +1
    • changedInput schema / properties / folder / description
      Previous value: -"Folder path to search recursively (e.g. \"attachments\"). Omit to list the whole vault."New value: +"Folder path to search recursively (e.g. \"attachments\" or \"Projects/media\"). Omit to list the whole vault."
  2. Changed1 schema field changedv0.50.0
    • addedInput schema / properties / limit / default
      Added value: +50
  3. Addedv0.32.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds substantially more: reads the filesystem rather than the index (explaining the case-sensitivity rule), empty-vs-error behavior for missing folders, three named error strings with their causes and remedies, and how 'bytes' relates to actual read cost (images shrunk, text over 100 KiB needing windowed reads).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and three illustrations, then organized under 'When to use', 'Behavior', 'Errors', and 'Returns'. It is long for a listing tool and the Returns paragraph drifts into read-path advice, but nearly every sentence carries non-obvious information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description fully documents the return shape (files/extension_counts/total/truncated, path sorting, '(none)' extension). Combined with error handling, case sensitivity, and sibling routing, an agent has everything needed to call this correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so per-parameter docs already exist and the baseline is 3. The description adds real meaning on top: it demonstrates each parameter with worked examples and supplies the case-sensitivity rule for 'folder' and the truncation semantics tied to 'limit' via the 'truncated' return field.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('List non-markdown files in the vault or a folder') with an explicit scope qualifier ('non-markdown') that immediately separates it from note-oriented siblings. The examples make the resource and filter axes concrete.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

A dedicated 'When to use' block names the alternative tools (vault_read_file, vault_list_notes, vault_search_by_folder, vault_search, vault_get_outgoing_links) and the exact condition that selects each. It also states which file types other search surfaces index, so the boundary is not left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.