File size: 1,629 Bytes
e55413f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""
Test des resources MCP
"""

from mcp_server import (
    get_available_plots_resource, 
    get_available_crops_resource, 
    get_available_years_resource,
    get_dataset_info,
    get_plot_info,
    get_crop_info,
    get_year_summary,
    get_herbicide_usage_summary,
    get_predictions_summary,
    get_recommendations_summary,
    get_plot_predictions
)

def test_mcp_resources():
    """Test des resources MCP"""
    print("🧪 Test des resources MCP...")
    
    # Test resources statiques
    print("\n📋 Test resources statiques:")
    print("Plots:", get_available_plots_resource())
    print("Crops:", get_available_crops_resource())
    print("Years:", get_available_years_resource())
    print("Dataset info:", get_dataset_info()[:200] + "...")
    
    # Test resources avec paramètres
    print("\n🏞️ Test resources avec paramètres:")
    print("Plot info:", get_plot_info("Champ ferme W du sol")[:200] + "...")
    print("Crop info:", get_crop_info("blé tendre hiver")[:200] + "...")
    print("Year summary:", get_year_summary(2023)[:200] + "...")
    
    # Test resources d'analyse
    print("\n📊 Test resources d'analyse:")
    print("Herbicide usage:", get_herbicide_usage_summary()[:200] + "...")
    print("Predictions:", get_predictions_summary()[:200] + "...")
    print("Recommendations:", get_recommendations_summary()[:200] + "...")
    
    # Test resource prédictions par parcelle
    print("\n🔮 Test prédictions par parcelle:")
    print("Plot predictions:", get_plot_predictions("Champ ferme W du sol")[:200] + "...")

if __name__ == "__main__":
    test_mcp_resources()