Skip to main content
Glama

delete-user

Permanently remove a user from Clerk authentication service by user ID. This action cannot be reversed.

Instructions

Deleta permanentemente um usuário do Clerk pelo ID. Esta ação é irreversível!

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYes

Implementation Reference

  • Core handler function that executes the delete-user tool logic by calling the Clerk API to permanently delete the user by ID.
    export async function deleteUser(params: { userId: string }) { try { const { userId } = params; await clerk.users.deleteUser(userId); return { success: true, message: `Usuário ${userId} deletado com sucesso` }; } catch (error: any) { return { success: false, error: error.message || 'Erro ao deletar usuário' }; } }
  • Input schema validation for the delete-user tool, defining the required userId parameter.
    export const deleteUserSchema = { userId: z.string().min(1) };
  • src/server.ts:64-83 (registration)
    Registration of the delete-user tool in the HTTP MCP server, including input/output schemas and thin wrapper handler.
    server.registerTool( 'delete-user', { title: 'Deletar Usuário', description: 'Deleta permanentemente um usuário do Clerk pelo ID. Esta ação é irreversível!', inputSchema: deleteUserSchema, outputSchema: { success: z.boolean(), message: z.string().optional(), error: z.string().optional() } }, async (params) => { const result = await deleteUser(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], structuredContent: result }; } );
  • Registration of the delete-user tool in the STDIO MCP server, identical to the HTTP version.
    server.registerTool( 'delete-user', { title: 'Deletar Usuário', description: 'Deleta permanentemente um usuário do Clerk pelo ID. Esta ação é irreversível!', inputSchema: deleteUserSchema, outputSchema: { success: z.boolean(), message: z.string().optional(), error: z.string().optional() } }, async (params) => { const result = await deleteUser(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], structuredContent: result }; } );

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/correaito/mcp_clerk'

If you have feedback or need assistance with the MCP directory API, please join our Discord server