Skip to main content
Glama
quinny1187

Obsidian MCP Server

by quinny1187

list_vaults

Discover and access available Obsidian vaults for file system operations, enabling direct interaction with notes through auto-discovery without plugins or REST API.

Instructions

List available Obsidian vaults

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that discovers available vaults using VaultManager and returns a list with paths, names, last modified dates, and total count.
    export async function handleListVaults(vaultManager: VaultManager) {
      const vaults = await vaultManager.discoverVaults();
      
      return {
        vaults: vaults.map(v => ({
          path: v.path,
          name: v.name,
          lastModified: v.lastModified,
        })),
        count: vaults.length,
      };
    }
  • Tool definition including name, description, and empty input schema for list_vaults.
    {
      name: 'list_vaults',
      description: 'List available Obsidian vaults',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:172-174 (registration)
    Switch case in the tool call handler that dispatches to the list_vaults handler function.
    case 'list_vaults':
      result = await handleListVaults(vaultManager);
      break;
  • src/index.ts:16-16 (registration)
    Import statement that brings in the handleListVaults function from the tools module.
    import { handleGetVaultInfo, handleListVaults } from './tools/vault.js';

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

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