Skip to main content
Glama

List Files

vault_list_files
Read-onlyIdempotent

Discover non-markdown files in an Obsidian vault or folder—images, PDFs, data files—with byte sizes and extension counts to locate and read them.

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"]).
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. The description goes well beyond: it explains that extension_counts/total reflect the full set even with truncation, describes path-traversal errors, hidden-folder blocking, and the difference between on-disk size vs delivery cost for images vs text, which annotations cannot convey.

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 well-structured with examples, usage guidance, parameter details, error cases, and return format—all clearly separated. It is slightly longer than strictly necessary (the bytes/large image detail could be condensed), but every section serves a distinct purpose.

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?

Despite having no output schema, the description fully documents the return format (files array, extension_counts, total, truncated). For a 3-parameter tool with zero required params, 100% schema coverage, and clear annotations, the description covers all behavioral and edge-case details an agent needs, including error conditions and cost considerations.

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 baseline is 3. The description adds significant value beyond the schema: explains case-insensitivity and leading-dot flexibility for extensions, clarifies default 50 for limit, and describes the recursive search behavior of folder. One deduction because it does not mention that bytes/large image behavior detail belongs more in the tool description than parameter semantics, but still adds substantial context.

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 clearly states 'List non-markdown files in the vault or a folder' and explicitly contrasts with sibling tools like vault_search, vault_list_notes, and vault_search_by_folder that cover only markdown notes, making the scope unambiguous.

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 description provides explicit 'When to use' guidance, naming specific sibling tools (vault_search, vault_list_notes, vault_search_by_folder) and indicating when to prefer vault_get_outgoing_links instead, plus three clear examples showing common use cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aliasunder/vault-cortex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server