Skip to main content
Glama
correaito
by correaito

Desbloquear Usuário

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
messageNo
successYes

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
        };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the action is to unlock a user, implying a mutation, but doesn't disclose behavioral traits like required permissions, whether it's reversible, side effects, or rate limits. The description is minimal and lacks crucial operational context for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the action and outcome without unnecessary words. It's front-loaded with the core purpose and appropriately sized for the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which handles return values) and minimal parameters, the description covers the basic purpose. However, as a mutation tool with no annotations, it lacks details on permissions, error cases, or behavioral nuances, making it incomplete for safe operation despite the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and only 1 parameter, the description doesn't add specific parameter details, but the tool's purpose inherently clarifies that 'userId' identifies the user to unlock. Since there's only one required parameter and the action is straightforward, the description provides adequate semantic context without needing explicit parameter explanation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Desbloqueia' - unlocks) and the resource ('um usuário do Clerk'), specifying that it allows the user to log in again. It distinguishes from 'lock-user' by being the opposite operation, though it doesn't explicitly differentiate from other siblings like 'delete-user' or 'list-users'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a user needs to be unlocked to regain login access, but doesn't provide explicit guidance on when to use this versus alternatives like 'delete-user' or prerequisites. It mentions the outcome ('permite que ele faça login novamente') which gives some context, but lacks clear when/when-not instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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