unblock_command
Remove commands from the blacklist to restore normal execution functionality in the Desktop Commander MCP server.
Instructions
Remove a command from the blacklist. Once unblocked, the command can be executed normally.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes |
Implementation Reference
- src/command-manager.ts:43-51 (handler)Core handler function that removes the specified command from the blocked commands set and saves the updated list to the config file.async unblockCommand(command: string): Promise<boolean> { command = command.toLowerCase().trim(); if (!this.blockedCommands.has(command)) { return false; } this.blockedCommands.delete(command); await this.saveBlockedCommands(); return true; }
- src/server.ts:243-249 (handler)Dispatch handler in CallToolRequest that validates input args and delegates to commandManager.unblockCommand.case "unblock_command": { const parsed = UnblockCommandArgsSchema.parse(args); const unblockResult = await commandManager.unblockCommand(parsed.command); return { content: [{ type: "text", text: unblockResult }], }; }
- src/server.ts:108-113 (registration)Tool registration in ListToolsResponse, providing name, description, and input schema reference.{ name: "unblock_command", description: "Remove a command from the blacklist. Once unblocked, the command can be executed normally.", inputSchema: zodToJsonSchema(UnblockCommandArgsSchema), },
- src/tools/schemas.ts:27-29 (schema)Zod input schema validating the 'command' parameter as a string.export const UnblockCommandArgsSchema = z.object({ command: z.string(), });