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

Output 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"],
        }
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the return format ('A dictionary with commands grouped by category'), which adds value beyond the input schema. However, it lacks details on permissions, rate limits, or side effects. The description doesn't contradict annotations (none exist), but it's minimal for behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by return details. It's efficient with two sentences and no wasted words. However, the structure could be slightly improved by integrating the return information more seamlessly, but it remains highly concise.

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

Completeness4/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 (0 parameters, no annotations, but with an output schema), the description is reasonably complete. It states the purpose and return format, and since an output schema exists, it doesn't need to detail return values further. However, it lacks context on when to use it versus siblings, leaving a minor gap in 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 tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description doesn't need to add parameter semantics, so it appropriately omits them. This meets the baseline for zero parameters, as the schema fully handles the lack of inputs without requiring additional explanation.

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 clearly states the verb ('List') and resource ('all available commands by category'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_command_help' or 'list_directories', which could also involve listing operations. The description is specific but lacks sibling differentiation.

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 doesn't mention prerequisites, context, or exclusions, nor does it compare to siblings like 'list_directories' or 'get_command_help'. The agent must infer usage from the purpose alone, which is insufficient for optimal tool selection.

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

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