Skip to main content
Glama
cfdude

Mac Shell MCP Server

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);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool performs a removal action, implying mutation, but doesn't describe permissions needed, whether the change is reversible, error conditions, or what happens if the command isn't in the whitelist. This leaves significant gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core function without any wasted words. It's appropriately sized for a simple tool with one parameter and gets straight to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after removal (e.g., confirmation message, error responses), doesn't mention security implications, and provides no context about the whitelist system it operates within.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single 'command' parameter adequately. The description doesn't add any additional meaning about parameter format, constraints, or examples beyond what the schema provides, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('remove') and target resource ('a command from the whitelist'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'deny_command' or 'update_security_level' which might have overlapping security functions, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'deny_command' or 'update_security_level'. The description only states what it does, not when it's appropriate or what prerequisites might exist (e.g., whether the command must already be whitelisted).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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