Skip to main content
Glama
andresthor

Command-Line MCP Server

by andresthor

list_available_commands

Discover available terminal commands by category to understand what operations can be safely executed through the Command-Line MCP Server interface.

Instructions

List all available commands by category.

Returns: A dictionary with commands grouped by category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the `list_available_commands` tool, which retrieves command lists from the configuration and returns them categorized.
    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"],
        }

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/andresthor/cmd-line-mcp'

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