Skip to main content
Glama
aliasunder

Vault Cortex Obsidian MCP Server

List Files

vault_list_files
Read-onlyIdempotent

Find images, PDFs, and other non-markdown files in an Obsidian vault. Filter by folder or extension and see per-file byte sizes and per-extension counts before reading files.

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_search, vault_list_notes, and vault_search_by_folder cover only markdown notes, so this is the discovery surface for everything else. For the files one specific note links to, prefer vault_get_outgoing_links.

Parameters:

  • folder: folder path filter (e.g. "attachments" or "Projects/media"), searched recursively; omit for the whole vault

  • extensions: restrict to these extensions — case-insensitive, with or without the leading dot (".png" and "png" both work)

  • limit: maximum entries returned (default 50). extension_counts and total always reflect the full filtered set, not just the returned page.

Errors:

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

  • A folder path escaping the vault (e.g. "../elsewhere") is rejected with a path-traversal error.

  • "hidden path blocked" — the folder is hidden (dot-prefixed, like ".obsidian"); hidden folders are not listable, matching Obsidian.

Returns: JSON with files (array of { path, extension, bytes }, sorted by path), 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. Files of supported types are readable via vault_read_file; vault_search covers markdown notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax entries returned (default 50).
folderNoFolder path to search recursively (e.g. "attachments"). 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. Changed1 schema field changedv0.50.0
    • addedInput schema / properties / limit / default
      Added value: +50
  2. Addedv0.32.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, but the description goes far beyond these basics. It explicitly explains error handling for empty/nonexistent folders, path-traversal rejection, and hidden-folder blocking, which is critical for correct agent behavior. It also clarifies that the 'bytes' field is on-disk size, not delivery cost, and explains the nuance that reading an image may return a shrunk copy while text returns verbatim—this is deep transparency about side effects and interpretation.

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?

The description is quite detailed and well-structured, with clear sections: an intro, examples, when-to-use, parameters, errors, and returns. However, it is longer than necessary and includes some redundancy (e.g., the returns section repeats the path-traversal and hidden-folder points already in the errors section). Nonetheless, the information is densely valuable and front-loaded with the primary purpose and examples, so it earns a high score.

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?

For a list tool with 3 optional parameters and no output schema, the description covers everything needed for correct invocation: parameter semantics, error scenarios, return format (files array, extension_counts, total, truncated), and cross-tool integration (vault_read_file). The agent can call this tool accurately and interpret results without further documentation. Given the richness of the description and the simplicity of the tool, it is thoroughly complete.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds significant semantic value. For folder, it mentions 'searched recursively' and gives concrete examples. For extensions, it confirms case-insensitivity and leading-dot flexibility, matching the schema but adding practical clarity. For limit, it clarifies that extension_counts and total reflect the full filtered set even if limit truncates the returned list—this is critical logic that the schema's 'Max entries returned' alone does not convey.

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?

The description starts with a clear and specific verb and resource: 'List non-markdown files in the vault or a folder'—it immediately conveys what the tool does and its scope. It also lists example file types (images, canvases, PDFs, data files) and subtly contrasts with sibling tools that only cover markdown notes, which distinguishes it from vault_list_notes, vault_search, and vault_search_by_folder.

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?

The 'When to use' section explicitly states discovery use cases for non-markdown files and references sibling tools (vault_search, vault_list_notes, vault_search_by_folder) to clarify what it does not cover. It also names a specific alternative for a different use case: 'For the files one specific note links to, prefer vault_get_outgoing_links.' This is exemplary routing guidance.

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