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())

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