From f7abb62603f48fa741c3f2795b4dcdc0e266cd81 Mon Sep 17 00:00:00 2001 From: YueGuobin Date: Tue, 16 Jun 2026 12:44:12 +0800 Subject: [PATCH] =?UTF-8?q?Rename=20device=5Fcommand=5Frun=5Fhandler=20?= =?UTF-8?q?=E2=86=92=20device=5Fshow=5Frun=5Fhandler=20to=20match=20tool?= =?UTF-8?q?=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gns3server/api/routes/mcp/__init__.py | 4 ++-- gns3server/api/routes/mcp/device_config.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gns3server/api/routes/mcp/__init__.py b/gns3server/api/routes/mcp/__init__.py index 7387320da..766193092 100644 --- a/gns3server/api/routes/mcp/__init__.py +++ b/gns3server/api/routes/mcp/__init__.py @@ -81,7 +81,7 @@ from .images import ( install_images_handler, ) from .device_config import ( - device_config_send_handler, device_command_run_handler, + device_config_send_handler, device_show_run_handler, vpcs_config_set_handler, ) from .nodes import ( @@ -1405,7 +1405,7 @@ async def device_show_run( params = {"project_id": project_id, "device_configs": device_configs} if template is not None: params["template"] = template - return await asyncio.to_thread(_run_handler_sync, device_command_run_handler, params) + return await asyncio.to_thread(_run_handler_sync, device_show_run_handler, params) @mcp.tool() diff --git a/gns3server/api/routes/mcp/device_config.py b/gns3server/api/routes/mcp/device_config.py index 3c06cc994..10d4b7634 100644 --- a/gns3server/api/routes/mcp/device_config.py +++ b/gns3server/api/routes/mcp/device_config.py @@ -102,7 +102,7 @@ def device_config_send_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) ) -def device_command_run_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) -> list[dict[str, Any]]: +def device_show_run_handler(params: dict[str, Any], gns3_ctx: dict[str, Any]) -> list[dict[str, Any]]: """Run read-only diagnostic (show) commands on network devices.""" project_id = params.get("project_id") device_configs = params.get("device_configs")