get_self_api_key
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. Authenticate this client (Claude Code: /mcp → Authenticate), then call this tool again. start_login does NOT open this tool.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_self_api_key"
}
}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. |