|
@@ -19,8 +19,8 @@ mcp = FastMCP("m2")
|
|
|
|
|
|
|
|
@mcp.tool(
|
|
@mcp.tool(
|
|
|
name="project.list",
|
|
name="project.list",
|
|
|
- title="Project List",
|
|
|
|
|
- description="List enabled projects configured in sys_config for m2 tools. 在执行其他工具前,询问用户要查询哪一个项目,根据用户的选择查询对应项目。",
|
|
|
|
|
|
|
+ title="项目列表",
|
|
|
|
|
+ description="列出目前用户可查询的项目列表。执行其他工具前,如前置未提到要查询项目的project_key,应先让用户选择要查询的项目,再使用对应的 project_key 调用后续工具。",
|
|
|
tags={"project", "list"},
|
|
tags={"project", "list"},
|
|
|
)
|
|
)
|
|
|
def project_list() -> dict[str, Any]:
|
|
def project_list() -> dict[str, Any]:
|
|
@@ -73,7 +73,7 @@ def search_ai_systems(
|
|
|
page_num: int = 1,
|
|
page_num: int = 1,
|
|
|
order_by: list[str] | None = None,
|
|
order_by: list[str] | None = None,
|
|
|
) -> Any:
|
|
) -> Any:
|
|
|
- """Search AI systems and return system codes. Default page_size is 20 unless explicitly overridden."""
|
|
|
|
|
|
|
+ """搜索AI控制系统并返回系统code。默认 page_size 为 20,除非显式传入其他值。"""
|
|
|
payload = api_search_ai_systems(
|
|
payload = api_search_ai_systems(
|
|
|
project_key,
|
|
project_key,
|
|
|
keyword=keyword,
|
|
keyword=keyword,
|
|
@@ -93,7 +93,7 @@ def search_ai_rcmd_operations(
|
|
|
page_num: int = 1,
|
|
page_num: int = 1,
|
|
|
order: str = "-create_time",
|
|
order: str = "-create_time",
|
|
|
) -> Any:
|
|
) -> Any:
|
|
|
- """Search AI strategy records by AI system code. Default page_size is 10 unless explicitly overridden. auto_exec=true means auto control, otherwise recommendation only."""
|
|
|
|
|
|
|
+ """按AI控制系统的code查询策略记录。默认 page_size 为 10,除非显式传入其他值。auto_exec=true 表示自动控制,否则表示推荐参考。"""
|
|
|
payload = api_search_ai_rcmd_operations(
|
|
payload = api_search_ai_rcmd_operations(
|
|
|
project_key,
|
|
project_key,
|
|
|
codes=codes,
|
|
codes=codes,
|
|
@@ -107,7 +107,7 @@ def search_ai_rcmd_operations(
|
|
|
|
|
|
|
|
@mcp.tool()
|
|
@mcp.tool()
|
|
|
def get_ai_online_v2(project_key: str, codes: list[str]) -> Any:
|
|
def get_ai_online_v2(project_key: str, codes: list[str]) -> Any:
|
|
|
- """Get AI control mode and status by AI system code. control_mode=1 means auto control; status=0 means normal and 1 means abnormal."""
|
|
|
|
|
|
|
+ """按AI控制系统的code查询控制模式和运行状态。control_mode=1 表示自动控制;status=0 表示正常,1 表示异常。"""
|
|
|
return api_get_ai_online_v2(project_key, codes=codes)
|
|
return api_get_ai_online_v2(project_key, codes=codes)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -121,7 +121,7 @@ def get_command_log(
|
|
|
page_num: int = 1,
|
|
page_num: int = 1,
|
|
|
export: bool = False,
|
|
export: bool = False,
|
|
|
) -> Any:
|
|
) -> Any:
|
|
|
- """Query command delivery logs by point_id and time range. In returned data, status=1 means the point was delivered successfully."""
|
|
|
|
|
|
|
+ """按 point_id 和时间范围查询指令下发日志。返回结果中 status=1 表示该点位下发成功。"""
|
|
|
payload = api_get_command_log(
|
|
payload = api_get_command_log(
|
|
|
project_key,
|
|
project_key,
|
|
|
point_id=point_id,
|
|
point_id=point_id,
|