|
@@ -14,6 +14,7 @@ from .config_api import (
|
|
|
list_systems as api_list_systems,
|
|
list_systems as api_list_systems,
|
|
|
search_devices as api_search_devices,
|
|
search_devices as api_search_devices,
|
|
|
search_meters as api_search_meters,
|
|
search_meters as api_search_meters,
|
|
|
|
|
+ search_points as api_search_points,
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -162,6 +163,13 @@ def search_meters(
|
|
|
return _append_next_page_hint(payload, page_num)
|
|
return _append_next_page_hint(payload, page_num)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+@mcp.tool()
|
|
|
|
|
+def search_points(project_key: str, id: int, page_size: int = 100, page_num: int = 1) -> Any:
|
|
|
|
|
+ """Search points under a meter by meter id."""
|
|
|
|
|
+ payload = api_search_points(project_key, id=id, page_size=page_size, page_num=page_num)
|
|
|
|
|
+ return _append_next_page_hint(payload, page_num)
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
def main() -> None:
|
|
def main() -> None:
|
|
|
host = os.getenv("MCP_HOST", "0.0.0.0").strip() or "0.0.0.0"
|
|
host = os.getenv("MCP_HOST", "0.0.0.0").strip() or "0.0.0.0"
|
|
|
port = int(os.getenv("MCP_PORT", "8500"))
|
|
port = int(os.getenv("MCP_PORT", "8500"))
|