Skip to main content
Glama

List API token metadata

api_tokens_list
Read-onlyIdempotent

Lists paginated API token metadata—IDs, owners, names, restrictions, and usage/expiry timestamps—without exposing bearer secrets or hashes; use returned IDs to retrieve token details.

Instructions

List API token metadata

Returns paginated items containing IDs, owners, names, restrictions and usage/expiry timestamps, never bearer secrets or hashes. Use api_token_get with a returned ID; limit defaults to 100, accepts 1–500, and nextCursor continues the list.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum results per page. Results are authorization-filtered before pagination.
cursorNoOpaque cursor returned by the preceding page.

Output Schema

NameRequiredDescriptionDefault
itemsYes
nextCursorNoOpaque continuation cursor; absent at the end.
operationIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / cursor / description
      Added value: +"Opaque cursor returned by the preceding page."
    • addedInput schema / properties / limit / description
      Added value: +"Maximum results per page. Results are authorization-filtered before pagination."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "APITokenRestrictions_depth14": {
      +      "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"
      +    },
      +    "APIToken_depth15": {
      +      "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"
      +        },
      +        "owner": {
      +          "maxLength": 128,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "prefix": {
      +          "type": "string"
      +        },
      +        "restrictions": {
      +          "$ref": "#/$defs/APITokenRestrictions_depth14"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "name",
      +        "owner",
      +        "prefix",
      +        "createdAt"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "additionalProperties": false,
      +  "properties": {
      +    "items": {
      +      "items": {
      +        "$ref": "#/$defs/APIToken_depth15"
      +      },
      +      "type": "array"
      +    },
      +    "nextCursor": {
      +      "description": "Opaque continuation cursor; absent at the end.",
      +      "type": "string"
      +    },
      +    "operationId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "items"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.4.3

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds meaningful behavior beyond that: the result set never includes bearer secrets or hashes, and results are authorization-filtered before pagination — both non-obvious and important.

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, front-loaded with purpose then security characteristics then paging mechanics. The leading sentence merely repeats the title, which is minor waste but the rest of the text is dense and earns its place.

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 low-complexity two-parameter list tool with an output schema, the description covers everything an agent needs: what is returned, what is deliberately excluded, paging continuation, and the natural follow-up call.

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 schema already documents limit (default 100, min 1, max 500) and cursor ('Opaque cursor returned by the preceding page'). The description largely restates these; the only added meaning is naming the response field nextCursor, which is a marginal gain. 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 (list API token metadata) and immediately contrasts with the sibling api_token_get, so an agent can select between listing and fetching by ID without inspecting schemas.

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 a concrete follow-up path ('use api_token_get with a returned ID') and explains how to continue paging via cursor. It lacks an explicit when-not statement or mention of other token sources, but the usage context for a filtered list 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