Skip to main content
Glama

remove_allowed_command

Remove a command from the project's allowed commands list to tighten security and control which commands can be executed in the workspace.

Instructions

Remove a command from the project's allowed commands list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesCommand to remove from allowed list

Implementation Reference

  • The handler function that removes a command from the allowed commands list. Loads the project config, finds the command by index, splices it out, and saves the config.
    async removeAllowedCommand(command: string): Promise<ToolResult> {
      try {
        const config = await this.configService.loadProjectConfig();
        
        const index = config.allowedCommands.indexOf(command);
        if (index === -1) {
          return {
            content: [{
              type: 'text',
              text: `Command '${command}' is not in the allowed list`
            }]
          };
        }
    
        config.allowedCommands.splice(index, 1);
        await this.configService.saveProjectConfig(config);
    
        return {
          content: [{
            type: 'text',
            text: `Command '${command}' removed from allowed list`
          }]
        };
    
      } catch (error) {
        return {
          isError: true,
          content: [{
            type: 'text',
            text: `Failed to remove allowed command: ${error}`
          }]
        };
      }
    }
  • Input schema definition for 'remove_allowed_command' tool, specifying 'command' as a required string parameter.
    {
      name: 'remove_allowed_command',
      description: 'Remove a command from the project\'s allowed commands list',
      inputSchema: {
        type: 'object',
        properties: {
          command: { type: 'string', description: 'Command to remove from allowed list' }
        },
        required: ['command']
      }
    },
  • src/index.ts:347-348 (registration)
    Registration of 'remove_allowed_command' in the tool dispatch switch statement, routing to secureCommandService.removeAllowedCommand(args.command).
    case 'remove_allowed_command':
      return await this.secureCommandService.removeAllowedCommand(args.command);
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It does not disclose side effects, error conditions, permissions required, or behavior when the command is not in the allowed list.

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 sentence, concise, and front-loaded with the action and resource. No unnecessary words.

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

Completeness3/5

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

For a simple mutation tool with one parameter and no output schema, the description is minimally adequate. However, it omits details on success/failure feedback or idempotency, which could be useful.

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?

The only parameter 'command' is fully described in the schema with 'Command to remove from allowed list'. The description adds no additional meaning beyond the schema, meeting the baseline for 100% schema coverage.

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

Purpose5/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 the target resource ('command from the project's allowed commands list'). It distinguishes itself from sibling tools like 'add_allowed_command' and 'get_allowed_commands'.

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?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites or conditions for removal. It only states what it does.

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/agentics-ai/code-mcp'

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