Skip to main content
Glama

unlock-user

Restores access for locked Clerk users by unlocking their accounts, enabling them to log in again using their user ID.

Instructions

Desbloqueia um usuário do Clerk, permitindo que ele faça login novamente

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYes

Implementation Reference

  • Core implementation of the unlock-user tool handler. Calls Clerk's unlockUser API to unlock the specified user and returns success/error response.
    export async function unlockUser(params: { userId: string }) { try { const { userId } = params; await clerk.users.unlockUser(userId); return { success: true, message: `Usuário ${userId} desbloqueado com sucesso` }; } catch (error: any) { return { success: false, error: error.message || 'Erro ao desbloquear usuário' }; } }
  • Input schema used for the unlock-user tool (shared with lock-user), validates the userId parameter.
    export const lockUserSchema = { userId: z.string().min(1) };
  • src/server.ts:108-127 (registration)
    Registration of the 'unlock-user' tool in the HTTP MCP server, defining metadata, schemas, and thin wrapper handler calling the core unlockUser function.
    server.registerTool( 'unlock-user', { title: 'Desbloquear Usuário', description: 'Desbloqueia um usuário do Clerk, permitindo que ele faça login novamente', inputSchema: lockUserSchema, // Usa o mesmo schema do lock outputSchema: { success: z.boolean(), message: z.string().optional(), error: z.string().optional() } }, async (params) => { const result = await unlockUser(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], structuredContent: result }; } );
  • Registration of the 'unlock-user' tool in the STDIO MCP server, identical to HTTP version.
    server.registerTool( 'unlock-user', { title: 'Desbloquear Usuário', description: 'Desbloqueia um usuário do Clerk, permitindo que ele faça login novamente', inputSchema: lockUserSchema, outputSchema: { success: z.boolean(), message: z.string().optional(), error: z.string().optional() } }, async (params) => { const result = await unlockUser(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