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

@proof-holdings/mcp-server

Official

get_api_key_usage

Read-only

Retrieve per-API-key verification usage counts by type, channel, and status, plus request, confirmation, and authorization totals and attribution context for the key and replaced keys.

Instructions

Get per-API-key usage for a given key id: verification counts by type/channel/status, plus verification-request/confirmation/authorization totals, and attribution context (attribution_cutoff_at, attributed_fraction). The counts cover the key and every key it replaced (api_key.replaced_key_ids). Counts only — no recipient identifiers. Scoped to the authenticated account; an API-key caller may read only its own key.

ACCESS: needs a Proof account. Set PROOF_API_KEY and restart this server, or sign in with start_login — a session opens this tool — then call this tool again.

Input Schema

NameRequiredDescriptionDefault
idYesThe API key id to fetch usage for
environmentNoScope metrics to test or production data (default: production)

Output Schema

NameRequiredDescriptionDefault
api_keyYes
confirmationsYes
verificationsYes
authorizationsYes
attributed_fractionYesFraction of the user verifications linked to any API key in scope (null when there are none)
attribution_cutoff_atYesUTC-day-floored date attribution began for this user (earliest key-linked verification), or null
verification_requestsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.2
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "description": "Per-API-key usage: verification counts by type/channel/status + per-collection totals (requests, confirmations, authorizations) + attribution metadata. The counts cover the key and every key it replaced (`api_key.replaced_key_ids`). Counts only — no recipient identifiers (SEC-001). Data is returned for revoked keys (audit).",
      +  "properties": {
      +    "api_key": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "created_at": {
      +          "type": "string"
      +        },
      +        "environment": {
      +          "type": "string"
      +        },
      +        "expires_at": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "id": {
      +          "type": "string"
      +        },
      +        "key_prefix": {
      +          "type": "string"
      +        },
      +        "last_used_at": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "profile_id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "replaced_key_ids": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "revoked_at": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "scopes": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "name",
      +        "key_prefix",
      +        "environment",
      +        "scopes",
      +        "last_used_at",
      +        "expires_at",
      +        "revoked_at",
      +        "created_at"
      +      ],
      +      "type": "object"
      +    },
      +    "attributed_fraction": {
      +      "description": "Fraction of the user verifications linked to any API key in scope (null when there are none)",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "attribution_cutoff_at": {
      +      "description": "UTC-day-floored date attribution began for this user (earliest key-linked verification), or null",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "authorizations": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "by_status": {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "total": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "total",
      +        "by_status"
      +      ],
      +      "type": "object"
      +    },
      +    "confirmations": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "by_status": {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "total": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "total",
      +        "by_status"
      +      ],
      +      "type": "object"
      +    },
      +    "verification_requests": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "by_status": {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "total": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "total",
      +        "by_status"
      +      ],
      +      "type": "object"
      +    },
      +    "verifications": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "by_channel": {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "by_status": {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "by_type": {
      +          "additionalProperties": {
      +            "type": "number"
      +          },
      +          "properties": {},
      +          "type": "object"
      +        },
      +        "total": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "total",
      +        "by_type",
      +        "by_channel",
      +        "by_status"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "api_key",
      +    "verifications",
      +    "verification_requests",
      +    "confirmations",
      +    "authorizations",
      +    "attribution_cutoff_at",
      +    "attributed_fraction"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond readOnlyHint=true, the description discloses non-obvious behavior an agent could not infer: counts roll up the key plus all keys it replaced via replaced_key_ids, results are aggregate-only with no recipient identifiers, and authorization limits differ between session and API-key callers. Those are exactly the traits that affect whether and how the tool should be called.

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 purpose and return contents are front-loaded in the first sentence, followed by scope caveats and a clearly separated ACCESS block. It is information-dense without padding, though the comma-heavy enumeration and the duplicated access/session note add some length.

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 read-only, two-parameter tool with a full schema, an output schema, and annotations, the description covers what is missing: aggregation semantics, privacy limits, and authentication prerequisites. An agent has everything needed to call it correctly without guessing.

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 coverage is 100%, so both parameters are already documented in the schema, which sets the baseline at 3. The description clarifies that 'id' is expanded to include replaced keys (a semantic detail the schema omits), but never mentions the environment parameter or its production/test defaulting.

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 per-API-key usage for a given key id') and then enumerates exactly what the response contains (verification counts by type/channel/status, request/confirmation/authorization totals, attribution context). The scoping sentence ('counts cover the key and every key it replaced') further pins down what 'per-key' means, so an agent can distinguish this from account-wide siblings like get_usage.

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?

Gives clear operating context: it applies to a specific key id, is scoped to the authenticated account, and an API-key caller can only read its own key — plus an explicit ACCESS block telling the agent to set PROOF_API_KEY or run start_login first. It stops short of naming the obvious alternative (get_usage) as the choice for account-level aggregates, so the routing decision is only implied.

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