Skip to main content
Glama

get_current_vault

Retrieve details about the currently active vault in Flint Note, enabling AI collaboration and organized markdown-based note management.

Instructions

Get information about the currently active vault

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "required": [], "type": "object" }

Implementation Reference

  • The handleGetCurrentVault method that executes the tool's logic: retrieves current vault info from GlobalConfigManager, formats it as rich text content for MCP response, handles no-vault case and errors.
    handleGetCurrentVault = async (): Promise<{ content: Array<{ type: string; text: string }>; }> => { try { const currentVault = this.globalConfig.getCurrentVault(); if (!currentVault) { return { content: [ { type: 'text', text: '⚠️ No vault is currently selected. Use list_vaults to see available vaults or create_vault to add a new one.' } ] }; } // Find the vault ID const vaults = this.globalConfig.listVaults(); const currentVaultEntry = vaults.find(v => v.is_current); const vaultId = currentVaultEntry?.info.id || 'unknown'; return { content: [ { type: 'text', text: `🟢 **Current Vault**: ${currentVault.name} (${vaultId}) **Path**: ${currentVault.path} **Created**: ${new Date(currentVault.created).toLocaleDateString()} **Last accessed**: ${new Date(currentVault.last_accessed).toLocaleDateString()}${currentVault.description ? `\n**Description**: ${currentVault.description}` : ''}` } ] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; return { content: [ { type: 'text', text: `Failed to get current vault: ${errorMessage}` } ] }; } };
  • Input schema definition for the get_current_vault tool: no required parameters.
    { name: 'get_current_vault', description: 'Get information about the currently active vault', inputSchema: { type: 'object', properties: {}, required: [] } },
  • MCP tool registration in CallToolRequestSchema handler: maps 'get_current_vault' calls to vaultHandlers.handleGetCurrentVault()
    case 'get_current_vault': return await this.vaultHandlers.handleGetCurrentVault();
  • GlobalConfigManager.getCurrentVault(): Returns VaultInfo for the current vault ID from loaded config or null if none set. Core utility used by the tool handler.
    getCurrentVault(): VaultInfo | null { if (!this.#config || !this.#config.current_vault) { return null; } return this.#config.vaults[this.#config.current_vault] || null; }

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/disnet/flint-note'

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