Skip to main content
Glama

get_allowed_commands

Retrieve the list of commands permitted for execution in the current project, ensuring secure command use based on project-specific configurations.

Instructions

Get list of commands that are allowed to run in this project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler that loads the project config and formats the list of allowed commands and custom tools into a text response.
    async getAllowedCommands(): Promise<ToolResult> {
      try {
        const config = await this.configService.loadProjectConfig();
        
        let commandText = 'Allowed Commands:\n';
        commandText += config.allowedCommands.map(cmd => `• ${cmd}`).join('\n');
        
        if (config.customTools && config.customTools.length > 0) {
          commandText += '\n\nCustom Tools:\n';
          commandText += config.customTools.map(tool => 
            `• ${tool.name}: ${tool.description}`
          ).join('\n');
        }
    
        return {
          content: [{
            type: 'text',
            text: commandText
          }]
        };
    
      } catch (error) {
        return {
          isError: true,
          content: [{
            type: 'text',
            text: `Failed to get allowed commands: ${error}`
          }]
        };
      }
  • Input schema definition: no parameters required, returns list of allowed commands.
    {
      name: 'get_allowed_commands',
      description: 'Get list of commands that are allowed to run in this project',
      inputSchema: {
        type: 'object',
        properties: {},
      }
  • src/index.ts:343-344 (registration)
    Routes the 'get_allowed_commands' case to SecureCommandService.getAllowedCommands().
    case 'get_allowed_commands':
      return await this.secureCommandService.getAllowedCommands();
Behavior2/5

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

No annotations are provided, so the description bears the full burden. It only states the purpose but does not disclose any behavioral traits such as authentication requirements, cache behavior, or potential changes to state. The description is minimal.

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 that is concise, front-loaded with the verb and resource, and contains no extraneous information.

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?

The tool has a simple purpose, but the description lacks details about the return format (e.g., list of strings, JSON array) and any potential output schema. Given the absence of an output schema, this gap reduces completeness.

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

Parameters4/5

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

The input schema has zero parameters with 100% description coverage, so the description does not need to add parameter details. Baseline is 4, and the tool does not require any parameter explanation.

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 verb 'Get' and the resource 'list of commands', and implicitly distinguishes from sibling tools like add_allowed_command and remove_allowed_command, which are write operations.

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

Usage Guidelines3/5

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

The description implies the tool is for querying the allowed commands list, but provides no explicit guidance on when to use it vs. alternatives (e.g., add_allowed_command or remove_allowed_command). No when-not context is given.

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