Skip to main content
Glama

List Access Tokens

affine_list_access_tokens

Retrieve metadata for all personal access tokens to manage authentication and access within the AFFiNE MCP Server environment.

Instructions

List personal access tokens (metadata).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that queries the GraphQL API for access tokens and returns their metadata or an empty array on error.
    const listAccessTokensHandler = async () => {
      try {
        const query = `query { accessTokens { id name createdAt expiresAt } }`;
        const data = await gql.request<{ accessTokens: any[] }>(query);
        return text(data.accessTokens || []);
      } catch (error: any) {
        console.error("List access tokens error:", error.message);
        return text([]);
      }
    };
  • Registers the 'affine_list_access_tokens' tool with no input schema, using the listAccessTokensHandler.
    server.registerTool(
      "affine_list_access_tokens",
      {
        title: "List Access Tokens",
        description: "List personal access tokens (metadata).",
        inputSchema: {}
      },
      listAccessTokensHandler as any
    );
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a read-only operation by using 'List', but doesn't disclose critical details like authentication requirements, rate limits, pagination, or what metadata is included. For a tool with zero annotation coverage, this is insufficient for safe and effective use.

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?

The description is a single, efficient sentence with zero wasted words. It front-loads the key action ('List') and resource, making it immediately understandable. Every element earns its place by conveying essential purpose without unnecessary elaboration.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that likely returns sensitive token metadata. It doesn't explain return values, error conditions, or security implications. While the zero-parameter schema reduces complexity, more context is needed for safe operation in a production environment.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately avoids discussing parameters, focusing instead on the tool's function. This meets the baseline for tools with no parameters, as it doesn't create confusion or redundancy.

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 clearly states the verb ('List') and resource ('personal access tokens (metadata)'), making the purpose unambiguous. It distinguishes from siblings like 'affine_generate_access_token' and 'affine_revoke_access_token' by focusing on listing rather than creating or deleting. However, it doesn't specify scope (e.g., all tokens vs. user-specific), which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication), compare it to similar tools like 'affine_list_comments' or 'affine_list_histories', or indicate when it's appropriate (e.g., for token management). This leaves the agent with minimal context for selection.

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

Related 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