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

@proof-holdings/mcp-server

Official

get_self_api_key

Read-only

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.

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.

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

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.
managed_by_sign_inNoTrue while an MCP sign-in connection holds this key and renews it itself; false for a key a person made and must replace by hand.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.12.0
    • addedOutput schema / properties / managed_by_sign_in
      Added value: +{
      +  "description": "True while an MCP sign-in connection holds this key and renews it itself; false for a key a person made and must replace by hand.",
      +  "type": "boolean"
      +}
  2. 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"
      +}
  3. First observedv1.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only tell the agent it is read-only; the description adds the security-critical behavior that the key hash and full secret are never returned, the exact failure mode for JWT auth (400 api_key_required), and the required auth setup. That is context the annotations cannot convey.

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?

The first sentence front-loads purpose, scope, return fields, and the redaction guarantee; the second covers auth failure. The separate ACCESS paragraph is slightly repetitive against the auth sentence but carries actionable setup instructions that justify its presence.

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 zero-parameter read tool with an output schema already defined, the description covers the remaining unknowns: auth requirements, failure mode, and the redaction boundary on returned data. Nothing an agent needs before calling is missing.

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?

The tool takes zero parameters, so there is nothing for the description to disambiguate — the baseline applies. The listed return fields are described as redacted, which usefully sets expectations even though parameters themselves need no explanation.

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?

States a specific verb and resource ('Get the calling API key's own redacted metadata') and scopes it to self-inspection, which separates it from the sibling list_api_keys / get_api_key_usage tools. It even enumerates the returned fields, so an agent knows exactly what it will get.

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?

Gives explicit when-to-use ('agent self-inspection') plus hard exclusions: JWT sessions have no single-key context and yield 400 api_key_required, and start_login does NOT unlock the tool. The access precondition (set PROOF_API_KEY, restart server) is spelled out as a step.

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