list_vaults
Retrieve all configured vaults with their current status and details to manage your note-taking system.
Instructions
List all configured vaults with their status and information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server/vault-handlers.ts:30-73 (handler)The handler function that executes the list_vaults tool logic, fetching vaults from globalConfig and formatting a markdown response.handleListVaults = async (): Promise<{ content: Array<{ type: string; text: string }>; }> => { try { const vaults = this.globalConfig.listVaults(); if (vaults.length === 0) { return { content: [ { type: 'text', text: 'No vaults configured. Use create_vault to add your first vault.' } ] }; } const vaultList = vaults .map(({ info, is_current }) => { const indicator = is_current ? '🟢 (current)' : '⚪'; return `${indicator} **${info.id}**: ${info.name}\n Path: ${info.path}\n Created: ${new Date(info.created).toLocaleDateString()}\n Last accessed: ${new Date(info.last_accessed).toLocaleDateString()}${info.description ? `\n Description: ${info.description}` : ''}`; }) .join('\n\n'); return { content: [ { type: 'text', text: `📁 **Configured Vaults**\n\n${vaultList}` } ] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; return { content: [ { type: 'text', text: `Failed to list vaults: ${errorMessage}` } ] }; } };
- src/server/tool-schemas.ts:556-562 (schema)The JSON schema definition for the list_vaults tool input (no parameters required).name: 'list_vaults', description: 'List all configured vaults', inputSchema: { type: 'object', properties: {}, required: [] }
- src/server.ts:1276-1277 (registration)Registration of the list_vaults tool in the CallToolRequestSchema switch statement, mapping the tool name to its handler method.return await this.vaultHandlers.handleListVaults(); case 'create_vault':
- src/server.ts:877-883 (registration)Tool metadata and schema registration in the ListToolsRequestSchema response.name: 'list_vaults', description: 'List all configured vaults with their status and information', inputSchema: { type: 'object', properties: {}, required: [] }
- src/utils/global-config.ts:376-386 (helper)Helper method in GlobalConfigManager that retrieves the list of all vaults with current status, used by the handler.listVaults(): Array<{ info: VaultInfo; is_current: boolean }> { if (!this.#config) { return []; } return Object.entries(this.#config.vaults).map(([id, info]) => ({ id, info, is_current: id === this.#config!.current_vault })); }