Skip to main content
Glama

remove_from_whitelist

Remove a specified command from the whitelist on the Mac Shell MCP Server to restrict its execution, ensuring secure terminal command management.

Instructions

Remove a command from the whitelist

Input Schema

NameRequiredDescriptionDefault
commandYesThe command to remove from whitelist

Input Schema (JSON Schema)

{ "properties": { "command": { "description": "The command to remove from whitelist", "type": "string" } }, "required": [ "command" ], "type": "object" }

Implementation Reference

  • The MCP tool handler for 'remove_from_whitelist'. Parses input arguments using Zod, calls CommandService.removeFromWhitelist(command), and returns a success message.
    private async handleRemoveFromWhitelist(args: unknown) { const schema = z.object({ command: z.string(), }); const { command } = schema.parse(args); this.commandService.removeFromWhitelist(command); return { content: [ { type: 'text', text: `Command '${command}' removed from whitelist`, }, ], }; }
  • src/index.ts:161-174 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema for 'remove_from_whitelist'.
    { name: 'remove_from_whitelist', description: 'Remove a command from the whitelist', inputSchema: { type: 'object', properties: { command: { type: 'string', description: 'The command to remove from whitelist', }, }, required: ['command'], }, },
  • Zod schema for input validation in the handler.
    const schema = z.object({ command: z.string(), });
  • Core implementation that removes the command from the internal whitelist Map.
    public removeFromWhitelist(command: string): void { this.whitelist.delete(command); }

Other Tools

Related 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/cfdude/mac-shell-mcp'

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