Skip to main content
Glama
andresthor

Command-Line MCP Server

by andresthor

get_configuration

Retrieve current configuration settings from the Command-Line MCP Server to access system parameters and operational values.

Instructions

Get the current configuration settings.

Returns: The current configuration settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler implementation for the 'get_configuration' tool, which retrieves and formats the current configuration settings.
    async def get_configuration() -> dict[str, Any]:
        """
        Get the current configuration settings.
    
        Returns:
            The current configuration settings
        """
        # Get a safe copy of the configuration
        config_copy = self.config.get_all()
    
        # Format it for display
        return {
            "server": config_copy["server"],
            "security": config_copy["security"],
            "commands": {
                "read_count": len(config_copy["commands"]["read"]),
                "write_count": len(config_copy["commands"]["write"]),
                "system_count": len(config_copy["commands"]["system"]),
                "blocked_count": len(config_copy["commands"]["blocked"]),
                "dangerous_patterns_count": len(
                    config_copy["commands"]["dangerous_patterns"]
                ),
                "full_command_lists": config_copy["commands"],
            },
            "output": config_copy["output"],
            "separator_support": self.config.has_separator_support(),
            "directory_whitelisting": {
                "enabled": True,
                "whitelisted_directories": self.whitelisted_directories,
                "note": "Directories not in this list will require session approval",
            },
        }
  • Registration of the get_configuration tool using the server application's tool decorator factory.
    get_configuration_tool = self.app.tool()
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 of behavioral disclosure. It only states that it 'Returns: The current configuration settings,' which is minimal. It doesn't cover aspects like whether this is a read-only operation, if it requires authentication, potential rate limits, or what happens on failure. For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 concise and front-loaded, with the main purpose stated first: 'Get the current configuration settings.' The second sentence clarifies the return value. There's no wasted text, and it's structured effectively for quick understanding, though it could be slightly more detailed without losing efficiency.

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 that there is an output schema (which handles return values), no parameters, and no annotations, the description is minimally complete. It states what the tool does and what it returns, but lacks context on usage, behavioral traits, or differentiation from siblings. For a simple retrieval tool, this is adequate but leaves clear gaps in guidance and transparency.

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 0 parameters with 100% description coverage, meaning there are no parameters to document. The description doesn't need to add parameter semantics beyond what the schema provides. Since there are no parameters, it appropriately avoids unnecessary details, aligning with the baseline for zero parameters.

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 tool's purpose: 'Get the current configuration settings.' It uses a specific verb ('Get') and identifies the resource ('configuration settings'), making the action clear. However, it doesn't differentiate this from sibling tools like 'list_directories' or 'list_available_commands,' which might also retrieve information, so it doesn't fully distinguish its scope.

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 any context, prerequisites, or exclusions, such as whether it's for system-wide settings or user-specific ones. With sibling tools like 'get_command_help' or 'list_available_commands' that also retrieve information, there's no indication of when this tool is the appropriate choice.

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