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

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