Skip to main content
Glama

List Access Tokens

list_access_tokens

List personal access tokens and view their metadata to manage authentication credentials.

Instructions

List personal access tokens (metadata).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function that executes the list_access_tokens tool logic. It makes a GraphQL query to fetch current user's access tokens (id, name, createdAt, expiresAt) and returns the data.
    const listAccessTokensHandler = async () => {
      try {
        const query = `query { currentUser { accessTokens { id name createdAt expiresAt } } }`;
        const data = await gql.request<{ currentUser: { accessTokens: any[] } }>(query);
        return text(data.currentUser?.accessTokens || []);
      } catch (error: any) {
        console.error("List access tokens error:", error.message);
        return text({ error: error.message });
      }
    };
  • Registration of the tool with the MCP server under the name 'list_access_tokens', including title, description, and empty inputSchema.
    server.registerTool(
      "list_access_tokens",
      {
        title: "List Access Tokens",
        description: "List personal access tokens (metadata).",
        inputSchema: {}
      },
      listAccessTokensHandler as any
    );
  • Input/output schema definition for list_access_tokens: has an empty inputSchema (no required inputs), title 'List Access Tokens', and description 'List personal access tokens (metadata).'
    "list_access_tokens",
    {
      title: "List Access Tokens",
      description: "List personal access tokens (metadata).",
      inputSchema: {}
  • Tool name listed in the ALL_TOOLS constant array, declaring list_access_tokens as one of the available tools.
    "list_access_tokens",
  • Permission/scope configuration for list_access_tokens: requires 'access_tokens', 'access_tokens.read', 'admin', or 'read' scopes. Also listed in READ_ONLY_TOOLS set on line 190.
    list_access_tokens: ["access_tokens", "access_tokens.read", "admin", "read"],
Behavior2/5

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

No annotations provided; the description does not disclose behavioral traits such as read-only nature, potential pagination, or authentication requirements. The term 'metadata' hints at non-sensitive data, but more detail is needed for full transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One concise sentence that is front-loaded with core action and resource. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Lacks information about return format, scope (e.g., all tokens for the user or workspace), and any side effects. Adequate for a simple list but could be more comprehensive.

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?

No parameters exist, so the description adds no parameter details. Baseline for zero parameters is 4, and the description adequately covers the operation's input-free nature.

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?

The description clearly states the verb 'list' and the resource 'personal access tokens' with a qualifier '(metadata)'. It is specific and distinguishes from sibling tools like 'generate_access_token' and 'revoke_access_token'.

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?

No explicit guidance on when to use this tool versus alternatives or exclusion criteria. For a simple list tool, usage is implied but not elaborated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DAWNCR0W/affine-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server