Skip to main content
Glama

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
NameRequiredDescriptionDefault
keyYesThe secret key name
scopeNoScope: global or project
projectPathNoProject root path for project-scoped secrets

Implementation Reference

  • 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));
    },
  • 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,
      },

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/I4cTime/quantum_ring'

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