Skip to main content
Glama

remove_from_whitelist

Remove macOS terminal commands from the security whitelist to restrict execution permissions in the Mac Shell MCP Server.

Instructions

Remove a command from the whitelist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesThe command to remove from whitelist

Implementation Reference

  • MCP tool handler: parses input using Zod, delegates to CommandService.removeFromWhitelist, returns success response.
    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`, }, ], }; }
  • Tool schema definition including name, description, and input schema (JSON Schema) advertised in ListTools response.
    { 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'], }, },
  • src/index.ts:232-233 (registration)
    Tool dispatch registration in the CallToolRequestSchema handler switch statement.
    case 'remove_from_whitelist': return await this.handleRemoveFromWhitelist(args);
  • Core helper method in CommandService that removes the command entry from the internal whitelist Map.
    public removeFromWhitelist(command: string): void { this.whitelist.delete(command); }

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