Skip to main content
Glama
MarkusPfundstein

MCP server for Obsidian

obsidian_list_files_in_vault

List all files and directories in your Obsidian vault to manage and navigate your notes effectively.

Instructions

Lists all files and directories in the root directory of your Obsidian vault.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The run_tool method that executes the obsidian_list_files_in_vault tool logic: instantiates Obsidian API and lists all files in the vault root, returning JSON.
    def run_tool(self, args: dict) -> Sequence[TextContent | ImageContent | EmbeddedResource]:
        api = obsidian.Obsidian(api_key=api_key, host=obsidian_host)
    
        files = api.list_files_in_vault()
    
        return [
            TextContent(
                type="text",
                text=json.dumps(files, indent=2)
            )
        ]
  • The get_tool_description method defining the tool schema: empty input schema (no parameters required).
    def get_tool_description(self):
        return Tool(
            name=self.name,
            description="Lists all files and directories in the root directory of your Obsidian vault.",
            inputSchema={
                "type": "object",
                "properties": {},
                "required": []
            },
        )
  • Registration of the ListFilesInVaultToolHandler instance in the tool_handlers dictionary via add_tool_handler.
    add_tool_handler(tools.ListFilesInVaultToolHandler())
Behavior2/5

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

With no annotations provided, the description carries full behavioral disclosure burden. It states what the tool does but doesn't describe behavioral traits like whether it returns recursive listings, file metadata, sorting order, pagination, error conditions, or performance characteristics. For a listing tool with zero annotation coverage, this leaves significant behavioral gaps.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the essential information ('Lists all files and directories') followed by the scope constraint. Every word earns its place with zero redundancy or unnecessary elaboration.

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

Completeness3/5

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

Given the tool's simplicity (zero parameters, no output schema) and lack of annotations, the description provides adequate basic functionality explanation but lacks completeness about behavioral aspects. For a listing operation, additional context about return format, recursion behavior, or error handling would be valuable but isn't provided.

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?

The tool has zero parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't waste space discussing nonexistent parameters. A baseline of 4 is appropriate for zero-parameter tools where the schema handles all parameter documentation.

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 the specific action ('Lists all files and directories') and target resource ('in the root directory of your Obsidian vault'), distinguishing it from sibling tools like 'obsidian_list_files_in_dir' which operates on arbitrary directories. The verb+resource+scope combination is precise and unambiguous.

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

Usage Guidelines4/5

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

The description implicitly defines usage context by specifying 'root directory' scope, suggesting this tool is for vault-wide listing rather than directory-specific operations. However, it doesn't explicitly state when to use this versus alternatives like 'obsidian_list_files_in_dir' or 'obsidian_get_recent_changes', missing explicit comparison guidance.

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/MarkusPfundstein/mcp-obsidian'

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