get_self_api_key
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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | MongoDB ObjectId | |
| name | Yes | ||
| scopes | Yes | ||
| created_at | Yes | ||
| expires_at | No | When the key stops authenticating; null means it never expires. Enforced at authentication — an expired key is rejected exactly like an unknown one. | |
| key_prefix | Yes | ||
| profile_id | No | Sub-account (PublicProfile) the key is bound to; null for unbound keys. | |
| revoked_at | No | When the key was revoked; null while it is live | |
| environment | Yes | ||
| last_used_at | No | When the key last authenticated a request; null if never | |
| replaced_key_ids | No | 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. |