Skip to main content
Glama
kelleyblackmore

Vault MCP Server

vault_write

Store encrypted secrets in HashiCorp Vault at specified paths using JSON data for secure credential management and configuration storage.

Instructions

Write a secret to Vault at the specified path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe path to write the secret to (e.g., 'secret/data/myapp')
dataYesThe secret data to write as a JSON object

Implementation Reference

  • The execution handler for the 'vault_write' tool. It extracts 'path' and 'data' from the tool arguments, wraps 'data' in an object for KV v2 compatibility, writes to Vault using vaultClient.write, and returns the JSON-stringified result as text content.
    case "vault_write": {
      const { path, data } = args as { path: string; data: Record<string, any> };
      // For KV v2, wrap data in a data object
      const result = await vaultClient.write(path, { data });
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input schema for the 'vault_write' tool, defining required 'path' (string) and 'data' (object) properties.
    inputSchema: {
      type: "object",
      properties: {
        path: {
          type: "string",
          description: "The path to write the secret to (e.g., 'secret/data/myapp')",
        },
        data: {
          type: "object",
          description: "The secret data to write as a JSON object",
        },
      },
      required: ["path", "data"],
    },
  • src/index.ts:45-62 (registration)
    Tool registration in the TOOLS array, including name, description, and input schema for 'vault_write'. This is returned by the ListTools handler.
    {
      name: "vault_write",
      description: "Write a secret to Vault at the specified path",
      inputSchema: {
        type: "object",
        properties: {
          path: {
            type: "string",
            description: "The path to write the secret to (e.g., 'secret/data/myapp')",
          },
          data: {
            type: "object",
            description: "The secret data to write as a JSON object",
          },
        },
        required: ["path", "data"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Write' implies a mutation operation, it doesn't specify whether this creates new secrets or updates existing ones, what permissions are required, whether the operation is idempotent, or how errors are handled. This leaves significant behavioral gaps for a write operation.

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 that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the core action, making it easy for an agent 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 write operation with no annotations and no output schema, the description is insufficiently complete. It doesn't address critical context like what happens on success/failure, whether existing secrets are overwritten, authentication requirements, or return values. The agent lacks necessary operational understanding.

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?

With 100% schema description coverage, both parameters are already documented in the schema. The description adds no additional semantic context beyond what's in the schema descriptions, such as path format conventions or data structure expectations. The baseline score of 3 reflects adequate but minimal value addition.

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 action ('Write a secret') and target resource ('to Vault at the specified path'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like vault_read or vault_delete, which would require mentioning this is for creating/updating secrets rather than reading or deleting them.

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 like vault_read or vault_delete. There's no mention of prerequisites, use cases, or exclusions, leaving the agent with no contextual decision-making information beyond the basic action.

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/kelleyblackmore/vault-mcp'

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