[{'Text': 'Edited point-topic-mcp/tests/test_gbs_tools.py:\n\n```diff\n@@ -166,13 +166,17 @@\n     if not hasattr(gbs, "get_gbs_status"):\n         pytest.skip("GBS tools not loaded (PT_RESEARCH_DATABASE_URI not set)")\n \n-    with patch("point_topic_mcp.core.mongodb_utils.find_one_operator", return_value=None):\n+    with (\n+        patch("point_topic_mcp.core.mongodb_utils.find_one_operator", return_value=None),\n+        patch("point_topic_mcp.core.mongodb_utils.find_global_variables_current", return_value=None),\n+    ):\n         result = gbs.get_gbs_status("UK", "NoSuchOperator", "2025Q1")\n         assert "Operator not found" in result\n \n \n def test_get_gbs_status_success():\n     """get_gbs_status returns status with operator_id, gaps grouped by type, staleness."""\n+    \n     from bson import ObjectId\n \n     import point_topic_mcp.tools.gbs_tools as gbs\n@@ -210,6 +214,85 @@\n     ):\n         result2 = gbs.get_gbs_status("UK", "BT", "2025Q1")\n         assert "2 quarters behind current (2025Q3)" in result2\n+\n+\n+def test_get_gbs_status_auto_detect_period():\n+    """get_gbs_status auto-detects period from GlobalVariables when omitted."""\n+    from bson import ObjectId\n+\n+    import point_topic_mcp.tools.gbs_tools as gbs\n+\n+    if not hasattr(gbs, "get_gbs_status"):\n+        pytest.skip("GBS tools not loaded (PT_RESEARCH_DATABASE_URI not set)")\n+\n+    op_id = ObjectId()\n+    mock_op = {"_id": {"$oid": str(op_id)}, "name": "BT", "country": "UK", "technologies": ["FTTP"]}\n+    mock_gv = {"isCurrent": True, "currentStatsPeriod": "2025Q3"}\n+    with (\n+        patch("point_topic_mcp.core.mongodb_utils.find_one_operator", return_value=mock_op),\n+        patch("point_topic_mcp.core.mongodb_utils.find_statistics", return_value=[]),\n+        patch("point_topic_mcp.core.mongodb_utils.find_global_variables_current", return_value=mock_gv),\n+    ):\n+        # Omit period — should auto-detect\n+        result = gbs.get_gbs_status("UK", "BT")\n+        assert "2025Q3" in result\n+        assert "Staleness: current" in result\n+\n+\n+def test_get_gbs_status_country_summary():\n+    """get_gbs_status with operator="" returns country-wide aggregated summary."""\n+    from bson import ObjectId\n+\n+    import point_topic_mcp.tools.gbs_tools as gbs\n+\n+    if not hasattr(gbs, "get_gbs_status"):\n+        pytest.skip("GBS tools not loaded (PT_RESEARCH_DATABASE_URI not set)")\n+\n+    op1_id = ObjectId()\n+    op2_id = ObjectId()\n+    op3_id = ObjectId()\n+    mock_ops = [\n+        {"_id": {"$oid": str(op1_id)}, "name": "BT", "country": "UK", "technologies": ["FTTP", "FTTC"]},\n+        {"_id": {"$oid": str(op2_id)}, "name": "Sky", "country": "UK", "technologies": ["FTTP"]},\n+        {"_id": {"$oid": str(op3_id)}, "name": "Virgin Media", "country": "UK", "technologies": ["Cable"]},\n+    ]\n+    mock_gv = {"isCurrent": True, "currentStatsPeriod": "2025Q2"}\n+\n+    # BT has data, Sky has data, Virgin has none\n+    def mock_find_stats(oid, period):\n+        if str(oid) == str(op1_id):\n+            return [{"type": "broadband", "tech": "FTTP", "channel": "Infrastructure", "domain": "Residential", "state": 2}]\n+        if str(oid) == str(op2_id):\n+            return [{"type": "broadband", "tech": "FTTP", "channel": "Retail", "domain": "Total", "state": 1}]\n+        return []\n+\n+    with (\n+        patch("point_topic_mcp.core.mongodb_utils.find_operators", return_value=mock_ops),\n+        patch("point_topic_mcp.core.mongodb_utils.find_statistics", side_effect=mock_find_stats),\n+        patch("point_topic_mcp.core.mongodb_utils.find_global_variables_current", return_value=mock_gv),\n+    ):\n+        # Omit operator to trigger country summary mode\n+        result = gbs.get_gbs_status("UK")\n+        assert "GBS Country Summary: UK" in result\n+        assert "Current period: 2025Q2" in result\n+        assert "Operators: 3 total | 2 with data | 1 without data" in result\n+        assert "Coverage: 67%" in result\n+        assert "✓ BT" in result\n+        assert "✓ Sky" in result\n+        assert "✗ Virgin Media" in result\n+\n+\n+def test_get_gbs_status_country_summary_no_country():\n+    """get_gbs_status without country and without operator returns error."""\n+    import point_topic_mcp.tools.gbs_tools as gbs\n+\n+    if not hasattr(gbs, "get_gbs_status"):\n+        pytest.skip("GBS tools not loaded (PT_RESEARCH_DATABASE_URI not set)")\n+\n+    with patch("point_topic_mcp.core.mongodb_utils.find_global_variables_current", return_value=None):\n+        result = gbs.get_gbs_status("")\n+        assert "Error" in result\n+        assert "country" in result\n \n \n def test_add_statistic_validation():\n\n```'}]