Skip to main content
Glama
disnet
by disnet

get_current_vault

Retrieve details about the currently active note vault to understand the working context and access organized markdown files.

Instructions

Get information about the currently active vault

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_current_vault' tool. It retrieves the current vault information from GlobalConfigManager, formats it nicely, and returns it as a text response. Handles the case where no vault is selected.
      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}`
              }
            ]
          };
        }
      };
  • The input schema definition for the 'get_current_vault' tool, specifying no required parameters.
      name: 'get_current_vault',
      description: 'Get information about the currently active vault',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      }
    },
  • Registration of the tool handler in the main MCP server's CallToolRequestSchema switch statement, dispatching calls to 'get_current_vault' to the VaultHandlers.handleGetCurrentVault method.
    case 'get_current_vault':
      return await this.vaultHandlers.handleGetCurrentVault();
    case 'update_vault':
  • Core helper method in GlobalConfigManager that retrieves the current vault information from the configuration, 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;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information, implying a read-only operation, but doesn't specify what information is returned (e.g., vault name, path, settings), whether it requires authentication, or if there are rate limits. The description is minimal and lacks behavioral details beyond the basic action.

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, clear sentence that is front-loaded with the tool's purpose. It wastes no words and efficiently communicates the core function without unnecessary elaboration, making it easy to parse and understand quickly.

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

Completeness2/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what 'information' includes (e.g., metadata, status), how it relates to siblings like 'list_vaults', or any behavioral traits. For a tool in a context with many sibling tools, more context is needed to ensure proper usage.

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 0 parameters, and the input schema has 100% description coverage (though empty). The description doesn't need to add parameter semantics, so it naturally compensates by focusing on the tool's purpose. With no parameters, the baseline is high as there's nothing to document beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('information about the currently active vault'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'list_vaults' or 'get_note_info', which reduces specificity. The description avoids tautology by not merely restating the tool name.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention siblings like 'list_vaults' (which lists all vaults) or 'get_vault' (if it existed), nor does it specify prerequisites such as needing an active vault. Usage is implied by the phrase 'currently active vault,' but no explicit when/when-not instructions are given.

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

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