Skip to main content
Glama

Delete Account

affine_delete_account

Permanently delete a user account from the AFFiNE MCP Server. Requires explicit confirmation to ensure irreversible action. Use to remove user data and access securely.

Instructions

Permanently delete user account. WARNING: This cannot be undone!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmYesMust be true to confirm account deletion

Implementation Reference

  • The deleteAccountHandler function implements the core logic for deleting the user account. It requires confirmation, sends a GraphQL mutation to deleteAccount, and returns success or error.
    const deleteAccountHandler = async ({ confirm }: { confirm: true }) => {
      if (!confirm) {
        return text({ error: "Confirmation required. Set confirm: true to delete account." });
      }
      
      try {
        const mutation = `
          mutation DeleteAccount {
            deleteAccount
          }
        `;
        
        const data = await gql.request<{ deleteAccount: boolean }>(mutation);
        
        return text({ success: data.deleteAccount, message: "Account deleted successfully" });
      } catch (error: any) {
        return text({ error: error.message });
      }
    };
  • Registers the 'affine_delete_account' tool with the MCP server, including title, description, input schema, and the handler function.
    server.registerTool(
      "affine_delete_account",
      {
        title: "Delete Account",
        description: "Permanently delete user account. WARNING: This cannot be undone!",
        inputSchema: {
          confirm: z.literal(true).describe("Must be true to confirm account deletion")
        }
      },
      deleteAccountHandler as any
    );
  • Zod input schema for the tool, requiring a literal true value for confirmation.
    inputSchema: {
      confirm: z.literal(true).describe("Must be true to confirm account deletion")
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates critical traits: the action is permanent ('Permanently delete') and irreversible ('cannot be undone'), which are essential for a destructive operation. However, it doesn't mention authentication requirements, rate limits, or what happens to associated data (e.g., workspaces, docs).

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 two short sentences with zero waste: the first states the action and resource, the second provides a critical warning. It's front-loaded with the core purpose and efficiently conveys essential information without unnecessary elaboration.

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?

Given the tool's high complexity (destructive account deletion) and lack of annotations or output schema, the description is minimally adequate. It covers the permanence and irreversibility, but for such a critical operation, it should ideally mention authentication needs, effects on related resources, or error conditions. The description is complete enough to understand the risk but has gaps in full context.

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 100% description coverage, with the single parameter 'confirm' documented as requiring true for deletion. The description doesn't add specific parameter details beyond the schema, but with one parameter and high coverage, the baseline is 3. It earns a 4 because the warning context ('WARNING: This cannot be undone!') implicitly reinforces the parameter's purpose, adding slight semantic value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Permanently delete') and resource ('user account'), distinguishing it from sibling tools like delete_workspace or delete_comment. It uses precise language that leaves no ambiguity about what the tool does.

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

Usage Guidelines3/5

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

The description implies this should be used for account deletion through the warning tone, but it doesn't explicitly state when to use it versus alternatives like affine_change_password for account management or provide prerequisites. The context is clear but lacks explicit guidance on alternatives or exclusions.

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