Skip to main content
Glama

Get API key

get_api_key
Read-onlyIdempotent

Retrieve metadata for one API key: scope, granular scopes, spend limits, allowed IPs, expiry and rate limit. Read-only; API-key callers can access only their own key's ID.

Instructions

Get metadata for one active API key: scope, granular scopes, paid_scopes, paid_operations_enabled, daily_spend_limit_eur, monthly_spend_limit_eur, allowed IPs, expiry and rate_limit. For API-key callers only the calling key's own ID is accessible — any other id answers 403 apiKeyForbidden, even when it does not exist. The full key and stored secrets are never returned. Read-only.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesAPI key ID from list_api_keys (the calling key's own ID)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.3.16

TDQS

A3.9/5.0
Behavior4/5

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

The annotations already establish read-only, idempotent, non-destructive, closed-world behavior. The description adds useful context beyond them: only the calling key's own ID is accessible, other IDs return 403 apiKeyForbidden even if they do not exist, and the full key and stored secrets are never returned. This is strong behavioral disclosure, with only minor redundancy in restating that the operation is read-only.

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 description is front-loaded with the tool's purpose and returned fields, then follows with access restrictions and secret-exposure guarantees. It is appropriately sized for the amount of behavioral information conveyed, though the final 'Read-only' statement is redundant with the readOnlyHint annotation.

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 simple one-parameter metadata retrieval tool with no output schema, the description is complete: it lists the returned metadata categories, explains access restrictions and error behavior for other IDs, and clarifies that secrets are never returned. The annotations also cover safety and idempotency, leaving no significant operational gap for an agent.

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?

Schema coverage is 100%, and the schema already documents that id is an API key ID from list_api_keys and refers to the calling key's own ID. The description adds meaningful access semantics by explaining that API-key callers can only retrieve their own key and that any other ID produces 403 apiKeyForbidden. That goes beyond the schema's basic parameter description.

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 metadata for one active API key, and enumerates the metadata fields returned. It clearly distinguishes metadata retrieval from secret retrieval by saying the full key and stored secrets are never returned, though it does not explicitly differentiate itself from sibling tools such as get_api_key_activity or get_api_key_inference_usage.

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?

The description implies usage for retrieving a single active API key's metadata and explains an important access restriction for API-key callers. However, it does not explicitly say when to use this tool versus list_api_keys or the activity and inference-usage siblings, so the guidance remains implicit rather than comparative.

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