(
service: ToolsService,
server_name: str,
body: dict[str, Any],
)
| 76 | |
| 77 | |
| 78 | def _test_config_body( |
| 79 | service: ToolsService, |
| 80 | server_name: str, |
| 81 | body: dict[str, Any], |
| 82 | ) -> dict[str, Any]: |
| 83 | config = body.get("mcp_server_config") or body.get("config") |
| 84 | if isinstance(config, dict): |
| 85 | return dict(config) |
| 86 | |
| 87 | stored_config = service.get_mcp_server_config(server_name) |
| 88 | if stored_config is not None: |
| 89 | return stored_config |
| 90 | |
| 91 | return {"name": server_name} |
| 92 | |
| 93 | |
| 94 | def _raise_tools_error(exc: ToolsServiceError) -> None: |
no test coverage detected