get_configuration
Retrieve current configuration settings from the cmd-line-mcp server to access terminal command permissions and security controls.
Instructions
Get the current configuration settings.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_configuration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- temp/src/cmd_line_mcp/server.py:610-641 (handler)The handler function 'get_configuration' retrieves and formats the current system configuration settings, including server info, security details, and command statistics.
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", }, }