Skip to main content
Glama

affine_revoke_access_token

Use this to revoke a personal access token in AFFiNE MCP Server by providing its unique ID, ensuring secure access control and termination of token permissions.

Instructions

Revoke a personal access token by id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • Handler function that executes the tool logic: sends a GraphQL mutation to revoke the access token by ID and returns success status.
    const revokeAccessTokenHandler = async (parsed: { id: string }) => { const mutation = `mutation($id:String!){ revokeUserAccessToken(id:$id) }`; const data = await gql.request<{ revokeUserAccessToken: boolean }>(mutation, { id: parsed.id }); return text({ success: data.revokeUserAccessToken }); };
  • Registers the "affine_revoke_access_token" tool with the MCP server, including title, description, and input schema.
    server.registerTool( "affine_revoke_access_token", { title: "Revoke Access Token", description: "Revoke a personal access token by id.", inputSchema: { id: z.string() } }, revokeAccessTokenHandler as any );
  • Input schema definition using Zod: requires a string 'id' for the access token.
    inputSchema: { id: z.string() }

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