list_available_commands
Discover available terminal commands by category to safely interact with the system through the MCP server.
Instructions
List all available commands by category.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- temp/src/cmd_line_mcp/server.py:381-396 (handler)The handler function implementation for list_available_commands.
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"], } - temp/src/cmd_line_mcp/server.py:378-380 (registration)Tool registration using the app decorator.
list_available_commands_tool = self.app.tool() @list_available_commands_tool # Keep decorator reference to satisfy linters