vault_read
Retrieve secrets from HashiCorp Vault using secure token authentication. Access stored credentials and sensitive data by specifying the Vault path.
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)Handler implementation for the 'vault_read' tool. It extracts the 'path' argument, calls vaultClient.read(path) to fetch the secret, and returns the data as a JSON-formatted text content block.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:34-43 (schema)Input schema definition for the 'vault_read' tool, specifying a required 'path' parameter of type string with description.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:31-44 (registration)Registration of the 'vault_read' tool in the TOOLS array, which is used by the ListToolsRequestSchema handler to advertise available tools.{ 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"], }, },