Skip to main content
Glama
@proof-holdings/mcp-server

@proof-holdings/mcp-server

Official

get_self_api_key

Read-only

Retrieve the calling API key's redacted metadata (ID, name, prefix, environment, scopes, usage and revocation dates) for agent self-inspection without exposing the full secret or hash.

Instructions

Get the calling API key's own redacted metadata (id, name, key_prefix, environment, scopes, last_used_at, revoked_at, created_at) for agent self-inspection. Never returns the key hash or full secret. Requires API-key auth — a JWT session has no single-key context (returns 400 api_key_required).

ACCESS: needs a Proof account. Set PROOF_API_KEY and restart this server, then call this tool again. start_login does NOT open this tool.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
idYesMongoDB ObjectId
nameYes
scopesYes
created_atYes
expires_atNoWhen the key stops authenticating; null means it never expires. Enforced at authentication — an expired key is rejected exactly like an unknown one.
key_prefixYes
profile_idNoSub-account (PublicProfile) the key is bound to; null for unbound keys.
revoked_atNoWhen the key was revoked; null while it is live
environmentYes
last_used_atNoWhen the key last authenticated a request; null if never
replaced_key_idsNoIds of the keys this key replaced, newest first: the earlier keys of the same integration, replaced when the key was regenerated (`POST /api/v1/me/api-keys/{id}/regenerate`) or renewed by an MCP sign-in refresh. Requests and usage of those keys count as this key's. Empty when it replaced none. Recorded from the release of key history on; a key replaced before it is not linked.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "description": "An API key's redacted metadata, as the calling key reads itself (`GET /me/api-key`). Never carries the key value.",
      +  "properties": {
      +    "created_at": {
      +      "type": "string"
      +    },
      +    "environment": {
      +      "type": "string"
      +    },
      +    "expires_at": {
      +      "description": "When the key stops authenticating; null means it never expires. Enforced at authentication — an expired key is rejected exactly like an unknown one.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "id": {
      +      "description": "MongoDB ObjectId",
      +      "type": "string"
      +    },
      +    "key_prefix": {
      +      "type": "string"
      +    },
      +    "last_used_at": {
      +      "description": "When the key last authenticated a request; null if never",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "profile_id": {
      +      "description": "Sub-account (PublicProfile) the key is bound to; null for unbound keys.",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "replaced_key_ids": {
      +      "description": "Ids of the keys this key replaced, newest first: the earlier keys of the same integration, replaced when the key was regenerated (`POST /api/v1/me/api-keys/{id}/regenerate`) or renewed by an MCP sign-in refresh. Requests and usage of those keys count as this key's. Empty when it replaced none. Recorded from the release of key history on; a key replaced before it is not linked.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "revoked_at": {
      +      "description": "When the key was revoked; null while it is live",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "scopes": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "name",
      +    "key_prefix",
      +    "environment",
      +    "scopes",
      +    "created_at"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, but the description adds the crucial disclosure that the key hash and full secret are never returned, plus the exact failure mode (400 api_key_required) for JWT callers. It also front-loads the auth requirement and environment-variable setup, so the agent knows both the safety profile and the preconditions.

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

Conciseness4/5

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

Two tight sections: a front-loaded purpose sentence with the field list and secret-exclusion guarantee, then a clearly labeled ACCESS block for the auth prerequisite. The ACCESS paragraph is slightly wordy in restating the retry step, but every sentence carries actionable information.

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?

For a parameterless read tool with an output schema, the description covers what an agent needs: what it returns, what it deliberately omits, what auth context it requires, and how to recover when the required auth is missing. Nothing material is left unstated.

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

Parameters4/5

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

There are zero input parameters, so baseline is 4 and there is no parameter meaning to add. The listed response fields are arguably redundant with the existing output schema, but they add no harm and give a quick preview of what the call returns.

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

Purpose4/5

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

The description uses a specific verb and resource: retrieve the *calling* API key's own redacted metadata, and enumerates the returned fields (id, name, key_prefix, environment, scopes, timestamps). The word 'own' implicitly separates it from the sibling list_api_keys, but no sibling is named explicitly, so differentiation is inferred rather than stated.

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

Usage Guidelines4/5

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

It states the use case ('agent self-inspection') and the exclusion condition clearly: a JWT session has no single-key context and will get a 400 api_key_required. It also explains the setup prerequisite (set PROOF_API_KEY and restart) and explicitly rules out start_login as an alternative path, which is unusually strong negative guidance. It stops short of pointing the agent to list_api_keys for multi-key inspection.

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

Deploy Server

Other Tools