Skip to main content
Glama

Read API token metadata

api_token_get
Read-onlyIdempotent

Retrieve API token metadata—owner, name, restrictions, and creation, usage, and expiry timestamps—without exposing the bearer secret. Use the token ID from the token list to inspect a credential.

Instructions

Read API token metadata

Returns the selected credential’s owner, name, restrictions and creation, usage and expiry timestamps, never its bearer secret or hash. Use api_tokens_list for IDs; missing records return 404 and other owners require global read permission.

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": {
      "token": "<token>"
    },
    "name": "api_token_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYesOpaque credential ID from api_tokens_list, api_token_get or api_token_create, passed verbatim as a 1–128 character string; not the display name or kk_-prefixed bearer secret.

Output Schema

NameRequiredDescriptionDefault
idYes
nameYes
ownerYes
prefixYes
createdAtYes
expiresAtNo
lastUsedAtNo
operationIdNo
restrictionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / token / description
      Added value: +"Opaque credential ID from api_tokens_list, api_token_get or api_token_create, passed verbatim as a 1–128 character string; not the display name or kk_-prefixed bearer secret."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "APITokenRestrictions_depth15": {
      +      "additionalProperties": false,
      +      "description": "Immutable deny overlay intersected with the owner's current permissions. Omission means unrestricted.",
      +      "properties": {
      +        "allowCredentialReveal": {
      +          "type": "boolean"
      +        },
      +        "clusters": {
      +          "items": {
      +            "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]/[a-z][a-z0-9]{1,11}$",
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "namespaces": {
      +          "items": {
      +            "pattern": "^[a-z][a-z0-9-]{0,30}[a-z0-9]$",
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "permissions": {
      +          "items": {
      +            "pattern": "^[a-z][a-z-]*:([a-z][a-z-]*|\\*)$",
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "readOnly": {
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "additionalProperties": false,
      +  "description": "Only metadata and a non-sensitive identifying prefix; the token value is never returned here.",
      +  "properties": {
      +    "createdAt": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "expiresAt": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "id": {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "lastUsedAt": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "name": {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "operationId": {
      +      "type": "string"
      +    },
      +    "owner": {
      +      "maxLength": 128,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "prefix": {
      +      "type": "string"
      +    },
      +    "restrictions": {
      +      "$ref": "#/$defs/APITokenRestrictions_depth15"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "name",
      +    "owner",
      +    "prefix",
      +    "createdAt"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.4.3

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, and the description adds real value on top: it names the secret-redaction guarantee, the 404 behavior for missing records, and the global read permission needed for cross-owner access. These are exactly the operational facts an agent cannot get from the structured fields.

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?

Three tight sentences with the resource and return payload front-loaded, then sourcing, then error/permission caveats. The opening clause largely restates the title, which is the only redundant element.

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 single-parameter read tool with full schema coverage, an output schema, and complete annotations, this covers the remaining gaps an agent would care about: redaction, 404 semantics, and permission scope. Nothing material is left unexplained.

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% and the token parameter's schema text already explains the opaque ID, the 1-128 character range, and that it is not the display name or bearer secret. The description only gestures at 'IDs' and the api_tokens_list source, adding little beyond the schema, so the baseline 3 applies.

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 ('Read API token metadata') and immediately enumerates the returned fields (owner, name, restrictions, timestamps), which distinguishes it from sibling list/get tools. The explicit exclusion of the bearer secret or hash further pins down what this tool is and is not.

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?

Routes the agent to api_tokens_list when it needs IDs, which is a concrete when-to-use signal, and notes the permission requirement for other owners' records. It stops short of stating exclusions such as when a list call alone would suffice, but the practical selection guidance is clear.

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