Skip to main content
Glama

list_available_commands

Discover available terminal commands by category to safely interact with the system through the MCP server.

Instructions

List all available commands by category.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function implementation for list_available_commands.
    async def list_available_commands() -> Dict[str, List[str]]:
        """
        List all available commands by category.
    
        Returns:
            A dictionary with commands grouped by category
        """
        # Get the latest command lists
        command_lists = self.config.get_effective_command_lists()
    
        return {
            "read_commands": command_lists["read"],
            "write_commands": command_lists["write"],
            "system_commands": command_lists["system"],
            "blocked_commands": command_lists["blocked"],
        }
  • Tool registration using the app decorator.
    list_available_commands_tool = self.app.tool()
    
    @list_available_commands_tool  # Keep decorator reference to satisfy linters
Behavior2/5

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

No annotations are provided, so the description carries full disclosure burden. While 'List' implies a read-only operation, the description fails to specify the output format, what constitutes a 'category,' whether the listing is static or dynamic, or if there are rate limiting concerns. It mentions 'by category' but does not explain the categorization scheme.

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 exactly six words with zero redundancy. It is front-loaded with the action and object, contains no filler words, and every term conveys necessary information about the operation's scope and organization.

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?

Given the tool's low complexity (zero parameters) and lack of annotations, the description meets minimum viability by stating the core function. However, without an output schema, it should ideally describe what data is returned (command names, descriptions, categories) to help the agent parse results.

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 contains zero parameters. Per the scoring guidelines, zero parameters establishes a baseline score of 4. The description correctly omits parameter discussion since none exist, and the 100% schema description coverage is trivially satisfied.

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 uses a specific verb ('List') and resource ('available commands') and includes the organization method ('by category'). It distinguishes clearly from siblings like execute_command (execution vs. listing) and list_directories (commands vs. directories), though it could explicitly differentiate from get_command_help.

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. It does not clarify when to use this discovery tool versus get_command_help for detailed documentation, nor does it mention prerequisites like requiring authentication or specific permissions to view available commands.

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/wwqdrh/MCPcmd'

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