Skip to main content
Glama

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 );

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