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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/tools/accessTokens.ts:66-70 (handler)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 }); };
- src/tools/accessTokens.ts:71-81 (registration)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 );
- src/tools/accessTokens.ts:76-78 (schema)Input schema definition using Zod: requires a string 'id' for the access token.inputSchema: { id: z.string() }