vault_read
Retrieve secrets from HashiCorp Vault by specifying the secret path to access stored sensitive data securely.
Instructions
Read a secret from Vault at the specified path
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The path to read the secret from (e.g., 'secret/data/myapp') |
Implementation Reference
- src/index.ts:119-130 (handler)The handler for the vault_read tool. It extracts the path from arguments, reads the secret using vaultClient.read(path), and returns the result data as formatted JSON text content.case "vault_read": { const { path } = args as { path: string }; const result = await vaultClient.read(path); return { content: [ { type: "text", text: JSON.stringify(result.data, null, 2), }, ], }; }
- src/index.ts:31-44 (registration)Registration of the vault_read tool in the TOOLS array, including its name, description, and input schema definition for the 'path' parameter.{ name: "vault_read", description: "Read a secret from Vault at the specified path", inputSchema: { type: "object", properties: { path: { type: "string", description: "The path to read the secret from (e.g., 'secret/data/myapp')", }, }, required: ["path"], }, },
- src/index.ts:34-43 (schema)Input schema definition for the vault_read tool, specifying the required 'path' string parameter.inputSchema: { type: "object", properties: { path: { type: "string", description: "The path to read the secret from (e.g., 'secret/data/myapp')", }, }, required: ["path"], },