Skip to main content
Glama
disnet
by disnet

update_vault

Modify vault details like name or description in Flint Note's AI-collaborative note-taking system to keep your organized markdown files current.

Instructions

Update vault information (name or description)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the vault to update
nameNoNew name for the vault
descriptionNoNew description for the vault

Implementation Reference

  • The main handler function for the 'update_vault' MCP tool. Validates input arguments using validateToolArgs('update_vault'), checks if vault exists, constructs updates object, calls globalConfig.updateVault, and returns a formatted success or error response.
      handleUpdateVault = async (
        args: UpdateVaultArgs
      ): Promise<{ content: Array<{ type: string; text: string }>; isError?: boolean }> => {
        try {
          // Validate arguments
          validateToolArgs('update_vault', args);
          const vault = this.globalConfig.getVault(args.id);
          if (!vault) {
            throw new Error(`Vault with ID '${args.id}' does not exist`);
          }
    
          const updates: Partial<Pick<typeof vault, 'name' | 'description'>> = {};
          if (args.name) updates.name = args.name;
          if (args.description !== undefined) updates.description = args.description;
    
          if (Object.keys(updates).length === 0) {
            throw new Error(
              'No updates provided. Specify name and/or description to update.'
            );
          }
    
          await this.globalConfig.updateVault(args.id, updates);
    
          const updatedVault = this.globalConfig.getVault(args.id)!;
          return {
            content: [
              {
                type: 'text',
                text: `✅ Updated vault '${args.id}':
    **Name**: ${updatedVault.name}
    **Description**: ${updatedVault.description || 'None'}
    **Path**: ${updatedVault.path}`
              }
            ]
          };
        } catch (error) {
          const errorMessage = error instanceof Error ? error.message : 'Unknown error';
          return {
            content: [
              {
                type: 'text',
                text: `Failed to update vault: ${errorMessage}`
              }
            ],
            isError: true
          };
        }
      };
  • The input schema definition for the 'update_vault' tool, defining required 'id' and optional 'name' and 'description' fields.
      name: 'update_vault',
      description: 'Update vault metadata (name and/or description)',
      inputSchema: {
        type: 'object',
        properties: {
          id: {
            type: 'string',
            description: 'ID of the vault to update'
          },
          name: {
            type: 'string',
            description: 'New name for the vault'
          },
          description: {
            type: 'string',
            description: 'New description for the vault'
          }
        },
        required: ['id']
      }
    },
  • Registration of the 'update_vault' tool in the MCP server's CallToolRequestSchema handler switch statement, mapping the tool name to the vaultHandlers.handleUpdateVault method.
    case 'update_vault':
      return await this.vaultHandlers.handleUpdateVault(
        args as unknown as UpdateVaultArgs
      );
  • Core helper function in GlobalConfigManager that performs the actual vault metadata update by modifying the in-memory config and persisting to YAML file.
    async updateVault(
      id: string,
      updates: Partial<Pick<VaultInfo, 'name' | 'description'>>
    ): Promise<void> {
      if (!this.#config) {
        await this.load();
      }
    
      if (!this.#config!.vaults[id]) {
        throw new Error(`Vault with ID '${id}' does not exist`);
      }
    
      if (updates.name) {
        this.#config!.vaults[id].name = updates.name;
      }
    
      if (updates.description !== undefined) {
        this.#config!.vaults[id].description = updates.description;
      }
    
      await this.save();
    }
  • TypeScript interface definition for UpdateVaultArgs used by the handler.
    export interface UpdateVaultArgs {
      id: string;
      name?: string;
      description?: string;
    }
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. It states this is an update operation, implying mutation, but doesn't disclose behavioral traits such as required permissions, whether changes are reversible, error conditions (e.g., invalid ID), or side effects. This is inadequate for a mutation tool with zero annotation coverage.

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, efficient sentence with zero waste. It's front-loaded with the core action and directly specifies the modifiable fields, making it easy to parse 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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects (e.g., permissions, errors), usage context, and expected outcomes, leaving significant gaps for an AI agent to understand how to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear descriptions for all three parameters (id, name, description). The description adds minimal value by listing updatable fields ('name or description'), but doesn't provide additional context like format constraints or examples beyond what the schema already documents.

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 ('Update') and resource ('vault information'), specifying what fields can be modified ('name or description'). It distinguishes from siblings like 'create_vault' (creation) and 'remove_vault' (deletion), but doesn't explicitly differentiate from other update tools like 'update_note' or 'update_note_type'.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing vault ID), exclusions (e.g., what happens if only one field is provided), or comparisons to similar tools like 'update_note' for different resources.

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