Skip to main content
Glama

get_command_help

Retrieve detailed help information about command capabilities and usage within the secure cmd-line-mcp server environment.

Instructions

Get detailed help about command capabilities and usage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the `get_command_help` tool, which retrieves command capabilities, restrictions, and usage examples.
    async def get_command_help() -> Dict[str, Any]:
        """
        Get detailed help about command capabilities and usage.
    
        This tool provides comprehensive information about:
        - Supported commands in each category (read, write, system)
        - Blocked commands for security reasons
        - Command chaining capabilities (pipes, semicolons, ampersands)
        - Usage restrictions and examples
    
        Returns:
            A dictionary with detailed information about command capabilities and usage
        """
        # Get the latest command lists and separator support
        command_lists = self.config.get_effective_command_lists()
        separator_support = self.config.has_separator_support()
    
        # Log the separator support for debugging
        logger.info(f"Separator support status: {separator_support}")
        logger.info(
            f"allow_command_separators setting: {self.config.get('security', 'allow_command_separators')}"
        )
    
        # Extra check for pipe character in dangerous patterns
        pipe_in_patterns = any(
            "|" in p or r"\|" in p for p in command_lists["dangerous_patterns"]
        )
        logger.info(
            f"Pipe character found in dangerous patterns: {pipe_in_patterns}"
        )
    
        # Update capabilities
        updated_capabilities = {
            "supported_commands": {
                "read": command_lists["read"],
                "write": command_lists["write"],
                "system": command_lists["system"],
            },
            "blocked_commands": command_lists["blocked"],
            "command_chaining": {
                "pipe": (
                    "Supported" if separator_support["pipe"] else "Not supported"
                ),
                "semicolon": (
                    "Supported"
                    if separator_support["semicolon"]
                    else "Not supported"
                ),
                "ampersand": (
                    "Supported"
                    if separator_support["ampersand"]
                    else "Not supported"
                ),
            },
            "command_restrictions": "Special characters like $(), ${}, backticks, and I/O redirection are blocked",
        }
    
        # Provide helpful information for Claude to understand command usage
        return {
            "capabilities": updated_capabilities,
            "examples": self.usage_examples,
            "recommended_approach": {
                "finding_large_files": "Use 'du -h <directory>/* | sort -hr | head -n 10' to find the 10 largest files",
                "file_searching": "Use 'find <directory> -type f -name \"pattern\"' for file searches",
                "text_searching": "Use 'grep \"pattern\" <file>' to search in files",
                "file_viewing": "Use 'cat', 'head', or 'tail' for viewing files",
                "sorting": "Use 'sort' with options like -n (numeric), -r (reverse), -h (human readable sizes)",
                "text_processing": "Use 'awk' for advanced text processing. For example: 'ls -la | awk \"{print $1, $9}\"' to show permissions and filenames",
                "column_filtering": "Use 'awk' to filter by column values: 'cat data.txt | awk \"{if($3 > 100) print}\"' to show lines where column 3 exceeds 100",
            },
            "permissions": {
                "read_commands": "Can be executed without confirmation",
                "write_commands": "Require approval for first use in a session",
                "system_commands": "Require approval for first use in a session",
            },
        }
Behavior2/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 states the tool retrieves 'help' but discloses nothing about the return format, whether this operation is safe/destructive, or if it requires pre-approval given the existence of 'approve_command_type' and 'approve_directory' siblings.

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 a single, efficient sentence with no redundant words. However, given the lack of annotations and output schema, it may be overly terse rather than appropriately concise.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the tool has zero parameters (low complexity), the absence of annotations and output schema creates an information gap. The description should explain the return structure or clarify this tool's role in the command execution/approval workflow suggested by sibling tools like 'approve_command_type' and 'execute_command'.

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, establishing a baseline score of 4. The description correctly implies no filtering parameters are needed to retrieve help, which aligns with the empty schema.

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 clear verb ('Get') and specifies the resource ('detailed help about command capabilities and usage'). It implies this provides documentation depth beyond what 'list_available_commands' (a sibling) would offer, though it doesn't explicitly contrast with siblings.

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 siblings like 'list_available_commands' (which likely just lists names) or 'execute_command'. It doesn't indicate whether this should be used before execution, for troubleshooting, or for discovering parameters.

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