Skip to main content
Glama

unblock_command

Restore access to a previously blacklisted command, allowing it to be executed normally within the Desktop Commander MCP server. Use this tool to re-enable blocked terminal commands for seamless operation.

Instructions

Remove a command from the blacklist. Once unblocked, the command can be executed normally.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes

Implementation Reference

  • Core implementation of unblockCommand method in CommandManager class. Trims and lowercases the command, checks if blocked, removes it from the set if present, saves to config file, and returns success boolean.
    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; }
  • Zod schema for unblock_command tool input: requires a 'command' string parameter.
    export const UnblockCommandArgsSchema = z.object({ command: z.string(), });
  • src/server.ts:108-113 (registration)
    Registers 'unblock_command' tool in the MCP server's listTools handler with name, description, and input schema converted to JSON schema.
    { name: "unblock_command", description: "Remove a command from the blacklist. Once unblocked, the command can be executed normally.", inputSchema: zodToJsonSchema(UnblockCommandArgsSchema), },
  • Switch case in callToolRequest handler that parses input args using the schema and invokes commandManager.unblockCommand, returning the result as MCP content.
    case "unblock_command": { const parsed = UnblockCommandArgsSchema.parse(args); const unblockResult = await commandManager.unblockCommand(parsed.command); return { content: [{ type: "text", text: unblockResult }], };

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/MrGNSS/ClaudeDesktopCommander'

If you have feedback or need assistance with the MCP directory API, please join our Discord server