Skip to main content
Glama

List Files

vault_list_files
Read-onlyIdempotent

List non-markdown files in the vault or a folder with per-file byte sizes and per-extension counts. Use to discover files 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_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 folder containing no files — or a folder 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.

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?

Beyond annotations (readOnlyHint, idempotentHint, destructiveHint false), the description adds important details: bytes is on-disk size (not delivery cost), explains that reading images shrinks them but text returns verbatim, and notes path-traversal rejection.

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 moderately long but well-structured with examples, usage guidelines, parameter details, and return format. It is front-loaded with the core purpose. A minor reduction for slight verbosity in the return format description, but still effective.

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, but the description fully explains the return JSON structure (files, extension_counts, total, truncated). It covers errors, edge cases, and relationships to sibling tools, making it self-contained and complete.

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 practical value: says folder is recursive, extensions are case-insensitive, limit default 50, and that counts reflect full set even when truncated. These clarifications merit a 4.

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 — images, canvases, PDFs, data files — with per-file byte sizes and per-extension counts.' It provides multiple examples and distinguishes from sibling tools like vault_search and vault_list_notes.

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?

Explicit 'When to use' section explains that this tool is for discovering files before reading them, and contrasts with markdown-only tools. It also advises when to use vault_get_outgoing_links instead, and covers error handling for empty or non-existent folders.

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