Skip to main content
Glama

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")
    }

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