Skip to main content
Glama

lock-user

Prevent user access by locking Clerk authentication accounts to block login attempts and secure your application.

Instructions

Bloqueia um usuário do Clerk, impedindo que ele faça login

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYes

Implementation Reference

  • Core handler function that locks a Clerk user by ID using the Clerk backend API, handling errors and returning success/error response.
    export async function lockUser(params: { userId: string }) { try { const { userId } = params; await clerk.users.lockUser(userId); return { success: true, message: `Usuário ${userId} bloqueado com sucesso` }; } catch (error: any) { return { success: false, error: error.message || 'Erro ao bloquear usuário' }; } }
  • Zod input schema for the lock-user tool, validating the required userId parameter.
    export const lockUserSchema = { userId: z.string().min(1) };
  • src/server.ts:86-105 (registration)
    MCP server registration of the 'lock-user' tool, including schema, description, and wrapper handler that calls the core lockUser function.
    server.registerTool( 'lock-user', { title: 'Bloquear Usuário', description: 'Bloqueia um usuário do Clerk, impedindo que ele faça login', inputSchema: lockUserSchema, outputSchema: { success: z.boolean(), message: z.string().optional(), error: z.string().optional() } }, async (params) => { const result = await lockUser(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