Skip to main content
Glama

vault_write

Store secrets securely in HashiCorp Vault by writing data to specified paths using JSON format for sensitive information management.

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

  • Handler for the vault_write tool: extracts path and data from arguments, wraps data for KV v2, writes to Vault using vaultClient.write, and returns the result as formatted JSON 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), }, ], }; }
  • src/index.ts:45-62 (registration)
    Registration of the vault_write tool in the TOOLS array used for ListToolsRequest, defining name, description, and inputSchema requiring 'path' (string) and 'data' (object).
    { 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"], }, },

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