inspect_secret
Analyze quantum-inspired secret metadata including superposition states, entanglement links, and access history without exposing the actual secret value.
Instructions
Show full quantum state of a secret: superposition states, decay status, entanglement links, access history. Never reveals the actual value.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The secret key name | |
| scope | No | Scope: global or project | |
| projectPath | No | Project root path for project-scoped secrets |
Implementation Reference
- src/mcp/server.ts:225-264 (handler)The implementation of the `inspect_secret` tool, which retrieves envelope data, checks for decay, and returns metadata about the secret's state, entanglement, and history without revealing the actual value.
async (params) => { const result = getEnvelope(params.key, opts(params)); if (!result) return text(`Secret "${params.key}" not found`, true); const { envelope, scope } = result; const decay = checkDecay(envelope); const info: Record<string, unknown> = { key: params.key, scope, type: envelope.states ? "superposition" : "collapsed", created: envelope.meta.createdAt, updated: envelope.meta.updatedAt, accessCount: envelope.meta.accessCount, lastAccessed: envelope.meta.lastAccessedAt ?? "never", }; if (envelope.states) { info.environments = Object.keys(envelope.states); info.defaultEnv = envelope.defaultEnv; } if (decay.timeRemaining) { info.decay = { expired: decay.isExpired, stale: decay.isStale, lifetimePercent: decay.lifetimePercent, timeRemaining: decay.timeRemaining, }; } if (envelope.meta.entangled?.length) { info.entangled = envelope.meta.entangled; } if (envelope.meta.description) info.description = envelope.meta.description; if (envelope.meta.tags?.length) info.tags = envelope.meta.tags; return text(JSON.stringify(info, null, 2)); }, - src/mcp/server.ts:217-224 (registration)The registration of the `inspect_secret` tool in the MCP server with its schema definitions.
server.tool( "inspect_secret", "Show full quantum state of a secret: superposition states, decay status, entanglement links, access history. Never reveals the actual value.", { key: z.string().describe("The secret key name"), scope: scopeSchema, projectPath: projectPathSchema, },