Skip to content

Commit c815cbe

Browse files
authored
refactor: drop duplicate convenience tools (#25)
1 parent 2403317 commit c815cbe

9 files changed

Lines changed: 8 additions & 1459 deletions

File tree

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,12 +330,9 @@ claude mcp add-json home-assistant '{
330330
| `ha_config_get_automation` | Get automation configuration | `ha_config_get_automation("automation.id")` |
331331
| `ha_config_remove_automation` | Delete automations | `ha_config_remove_automation("automation.id")` |
332332

333-
### Convenience Tools
333+
### History & Insights Tools
334334
| Tool | Description | Example |
335335
|------|-------------|---------|
336-
| `ha_activate_scene` | Activate a Home Assistant scene | `ha_activate_scene("scene.movie_time")` |
337-
| `ha_get_weather` | Get current weather information | `ha_get_weather()` |
338-
| `ha_get_energy` | Get energy usage information | `ha_get_energy()` |
339336
| `ha_get_logbook` | Access historical logbook entries | `ha_get_logbook(hours_back=24)` |
340337

341338
### Backup & Restore Tools
@@ -386,7 +383,7 @@ For comprehensive testing documentation, see **[tests/README.md](tests/README.md
386383
- [x] Smart search tools with fuzzy matching
387384
- [x] Optimized tool documentation to reduce tool call errors
388385
- [x] WebSocket async device control
389-
- [x] Convenience tools for scenes and automations
386+
- [x] Logbook history and operational insights
390387
- [x] Comprehensive test suite
391388
- [x] Home Assistant Add-on support
392389
- [x] Docker images with multi-mode support

homeassistant-addon/DOCS.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,7 @@ The add-on provides 20+ MCP tools for controlling Home Assistant:
286286
- `ha_get_operation_status` - Check operation status
287287
- `ha_get_bulk_status` - Check multiple operations
288288

289-
### Convenience
290-
- `ha_activate_scene` - Activate scenes
291-
- `ha_get_weather` - Weather information
292-
- `ha_get_energy` - Energy usage data
289+
### History & Insights
293290
- `ha_get_logbook` - Historical events
294291

295292
### Backup & Restore

src/ha_mcp/server.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from .config import get_global_settings
1212
from .prompts.enhanced import EnhancedPromptsMixin
1313
from .tools.enhanced import EnhancedToolsMixin
14-
from .tools.convenience import create_convenience_tools
1514
from .tools.device_control import create_device_control_tools
1615
from .tools.smart_search import create_smart_search_tools
1716
from .prompts.manager import register_mcp_prompts
@@ -37,7 +36,6 @@ def __init__(self, client: HomeAssistantClient | None = None):
3736
# Initialize smart tools
3837
self.smart_tools = create_smart_search_tools(self.client)
3938
self.device_tools = create_device_control_tools(self.client)
40-
self.convenience_tools = create_convenience_tools(self.client)
4139

4240
# Initialize tools registry
4341
self.tools_registry = ToolsRegistry(self)
@@ -111,7 +109,7 @@ async def start(self) -> None:
111109
logger.error(f"❌ Error testing connection: {e}")
112110

113111
# Log available tools count
114-
logger.info("🔧 Smart server with 20+ enhanced tools loaded")
112+
logger.info("🔧 Smart server with enhanced tools loaded")
115113

116114
# Run the MCP server with async compatibility
117115
await self.mcp.run_async()

src/ha_mcp/tools/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
"""
2-
Custom tools for Home Assistant MCP server.
3-
"""
1+
"""Custom tools for the Home Assistant MCP server."""
42

5-
from .convenience import ConvenienceTools, create_convenience_tools
63
from .device_control import DeviceControlTools, create_device_control_tools
74
from .smart_search import SmartSearchTools, create_smart_search_tools
85

@@ -11,6 +8,4 @@
118
"create_smart_search_tools",
129
"DeviceControlTools",
1310
"create_device_control_tools",
14-
"ConvenienceTools",
15-
"create_convenience_tools",
1611
]

0 commit comments

Comments
 (0)