Skip to main content
Glama

inspect_secret

Read-onlyIdempotent

Inspect a secret's metadata—environments, decay, rotation, entanglement, access counters—without exposing the value. Debug why a key is expired or stale before reading it.

Instructions

[secrets] Show full metadata for a single secret — env states, decay window, entanglement links, access counters — without ever revealing the value. Use when you need to understand the shape of a key before reading it or to debug 'why is this expired/stale'; prefer get_secret for the actual value, list_secrets for a many-key overview, and audit_log for the full access timeline. Read-only; does not write a 'read' event since the value is not exposed. Returns pretty-printed JSON with fields: key, scope, type ('superposition'|'collapsed'), created, updated, accessCount, lastAccessed, environments, defaultEnv, decay { expired, stale, lifetimePercent, timeRemaining }, rotation { lastRotatedAt, ageDays, rotateEveryDays, dueAt, daysUntilDue, state: 'ok'|'due-soon'|'overdue'|'unscheduled' }, entangled, description, tags. Errors with not-found if the key is absent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesExact secret key name to inspect. Example: 'OPENAI_API_KEY'.
orgIdNoOrganization identifier for org-scoped secrets. Required only when scope='org'. Example: 'acme-corp'.
scopeNoWhere the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId).
teamIdNoTeam identifier for team-scoped secrets. Required only when scope='team'. Example: 'acme-platform'.
projectPathNoAbsolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.11.7
    • changedInput schema / properties / key / description
      Previous value: -"The secret key name"New value: +"Exact secret key name to inspect. Example: 'OPENAI_API_KEY'."
    • changedInput schema / properties / orgId / description
      Previous value: -"Org identifier for org-scoped secrets"New value: +"Organization identifier for org-scoped secrets. Required only when scope='org'. Example: 'acme-corp'."
    • changedInput schema / properties / projectPath / description
      Previous value: -"Project root path for project-scoped secrets"New value: +"Absolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted."
    • changedInput schema / properties / scope / description
      Previous value: -"Scope: global, project, team, or org"New value: +"Where the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId)."
    • changedInput schema / properties / teamId / description
      Previous value: -"Team identifier for team-scoped secrets"New value: +"Team identifier for team-scoped secrets. Required only when scope='team'. Example: 'acme-platform'."
  2. Changed4 schema fields changedv0.11.5
    • addedInput schema / properties / orgId
      Added value: +{
      +  "description": "Org identifier for org-scoped secrets",
      +  "type": "string"
      +}
    • changedInput schema / properties / scope / description
      Previous value: -"Scope: global or project"New value: +"Scope: global, project, team, or org"
    • changedInput schema / properties / scope / enum
      Previous value: -[
      -  "global",
      -  "project"
      -]New value: +[
      +  "global",
      +  "project",
      +  "team",
      +  "org"
      +]
    • addedInput schema / properties / teamId
      Added value: +{
      +  "description": "Team identifier for team-scoped secrets",
      +  "type": "string"
      +}
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark the tool as readOnly and idempotent, but the description adds a genuinely behavioral nuance: 'does not write a "read" event since the value is not exposed.' This is non-obvious and not inferable from annotations. It also discloses error behavior ('Errors with not-found if the key is absent') and the 'without ever revealing the value' guarantee — all meaningful additions beyond the structured metadata.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every sentence earns its place: purpose, usage guidance, behavioral caveat, return shape, error condition. It front-loads 'Show full metadata for a single secret' and progressively layers detail. The long return-field list is acceptable because the tool has no output schema — that list is a necessary and well-factored substitute. No filler words or redundant restatements.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Because there is no output schema, the description fully compensates by itemizing the returned JSON fields, including nested decay and rotation objects with their subfields. It covers error behavior, explains which sibling to prefer in which situation, and names the tool's non-event side effect. For a single-secret inspect tool, nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter (key, orgId, scope, teamId, projectPath) is already documented with types and examples. The description adds essentially no new parameter-level detail, but it does reinforce the 'key' parameter with a concrete example ('OPENAI_API_KEY') and the not-found error. Per the baseline rule, a 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with a specific verb and resource: 'Show full metadata for a single secret.' It then enumerates what that metadata includes — env states, decay window, entanglement links, access counters — and draws an explicit line against sibling tools by promising to do this 'without ever revealing the value.' This distinguishes it clearly from get_secret, list_secrets, and audit_log even before the usage sentence appears.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The tool explicitly names its niche: 'Use when you need to understand the shape of a key before reading it or to debug "why is this expired/stale".' It then names three alternatives and their purposes: 'prefer get_secret for the actual value, list_secrets for a many-key overview, and audit_log for the full access timeline.' This is textbook routing guidance with no ambiguity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.