Skip to main content
Glama

Revoke Access Token

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()
    }
Behavior2/5

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

With no annotations, the description carries full burden but provides minimal behavioral context. It states the action is 'revoke' (implying a destructive operation), but doesn't disclose if this is reversible, requires specific permissions, has side effects (e.g., invalidating sessions), or rate limits. This is inadequate for a mutation tool with zero annotation coverage.

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 no wasted words. It front-loads the core action and resource, making it immediately understandable. Every part of the sentence contributes essential information.

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?

For a destructive tool with no annotations and no output schema, the description is incomplete. It covers the basic purpose and parameter semantics but lacks critical behavioral details (e.g., permanence, permissions) and usage context. This is minimally viable but leaves significant gaps for safe agent operation.

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 description adds meaning by specifying that the 'id' parameter refers to a 'personal access token' identifier, which is valuable given 0% schema description coverage and only one parameter. It clarifies the parameter's purpose beyond the bare schema, though it doesn't detail the id format (e.g., UUID).

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 action ('revoke') and resource ('personal access token'), with the specific identifier ('by id'). It distinguishes from sibling tools like 'affine_generate_access_token' and 'affine_list_access_tokens' by focusing on revocation rather than creation or listing. However, it doesn't explicitly mention what 'revoke' entails (e.g., permanent deactivation).

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't specify prerequisites (e.g., needing admin rights or ownership of the token), nor does it mention related tools like 'affine_delete_account' for broader account management. The context is implied but not articulated.

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