Skip to main content
Glama

unlock-user

Restore user access to Clerk authentication by unlocking accounts that were previously disabled, allowing users to sign in again.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYes

Implementation Reference

  • Core handler function implementing the unlock-user tool logic by calling Clerk's unlockUser API on the provided userId.
    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 for unlock-user tool (reused from lock-user), validating the required 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, including schema, description, and thin wrapper handler.
    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 the 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