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

@proof-holdings/mcp-server

Official

get_api_key_usage

Read-only

Retrieve per-API-key usage counts for a given key ID, including verification totals by type, channel, and status, plus attribution context and replaced-key coverage.

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 — either opens this tool — then call this tool again.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "get_api_key_usage"
  }
}

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/5.0
Behavior5/5

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

Beyond readOnlyHint=true the description adds substantial behavioral context: counts roll up the key plus every key it replaced (api_key.replaced_key_ids), results are counts only with no recipient identifiers, scope is the authenticated account, and an API-key caller may only read its own key. These are exactly the aggregation, data-minimization, and authorization facts an agent cannot get from the annotations.

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 is front-loaded in the first clause and the supporting details (aggregation, data minimization, scoping) follow in a logical order. The trailing access block is somewhat verbose and its "restart this server / call this tool again" phrasing is operational chatter, but it is still actionable.

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?

With an output schema present the description need not detail return shapes, and it still names the metric families, the aggregation scope, and the authorization boundary. Nothing an agent needs in order to call this correctly is missing.

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, and the description adds only a modest amount: it clarifies that the id drives both the key's own counts and those of its replacement chain. The environment parameter (production/test scoping) is not mentioned in the description at all, so it relies entirely on the schema.

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 states a specific verb and resource ("Get per-API-key usage for a given key id") and enumerates exactly what is returned: verification counts by type/channel/status plus verification-request/confirmation/authorization totals. It never explicitly contrasts itself with the sibling account-level "get_usage" or with "get_self_api_key", so sibling differentiation is only implied by the "per-API-key" qualifier.

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

Usage Guidelines3/5

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

Guidance is focused on access prerequisites rather than tool selection: it says a Proof account is needed and how to authenticate (PROOF_API_KEY or start_login, then retry). It gives no explicit when-to-use-this-vs-alternatives instruction, so an agent must infer that this is the per-key view rather than the account-wide one.

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