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
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The command to remove from whitelist |
Implementation Reference
- src/index.ts:393-410 (handler)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`, }, ], }; }
- src/index.ts:161-174 (schema)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); }