[
  {
    "name": "lifeanalytics.period_summary",
    "description": "Résumé analytique général d'une période LifeAnalytics autorisée, avec qualité des données et premières tendances calculées côté Laravel.",
    "isReadOnly": true,
    "http": {"method": "POST", "url": "https://lifeanalytics.baptistegaston.com/api/internal/relai/tools/period-summary", "headers": {"Authorization": "Bearer ${LIFEANALYTICS_RELAI_TOOL_TOKEN}", "Content-Type": "application/json"}},
    "inputSchema": {"type": "object", "properties": {"context_token": {"type": "string"}, "start": {"type": "string", "format": "date"}, "end": {"type": "string", "format": "date"}}, "required": ["context_token", "start", "end"], "additionalProperties": false},
    "exampleInput": {"context_token": "temporary_context_token", "start": "2026-06-04", "end": "2026-07-03"},
    "exampleOutput": {"period": {"start": "2026-06-04", "end": "2026-07-03", "calendar_days": 30}, "data_quality": {"reliability_level": "interesting_trend"}, "scores": {"daily_score": {"average_final_score": 7.2}}, "simple_trends": []}
  },
  {
    "name": "lifeanalytics.best_worst_days",
    "description": "Classe les meilleurs et pires jours avec leurs métriques explicatives.",
    "isReadOnly": true,
    "http": {"method": "POST", "url": "https://lifeanalytics.baptistegaston.com/api/internal/relai/tools/best-worst-days", "headers": {"Authorization": "Bearer ${LIFEANALYTICS_RELAI_TOOL_TOKEN}", "Content-Type": "application/json"}},
    "inputSchema": {"type": "object", "properties": {"context_token": {"type": "string"}, "start": {"type": "string", "format": "date"}, "end": {"type": "string", "format": "date"}, "limit": {"type": "integer", "minimum": 1, "maximum": 10}}, "required": ["context_token", "start", "end"], "additionalProperties": false},
    "exampleInput": {"context_token": "temporary_context_token", "start": "2026-06-04", "end": "2026-07-03", "limit": 5},
    "exampleOutput": {"best_days": [{"date": "2026-06-10", "score": 8.9, "sleep_minutes": 480, "screen_minutes": 120, "sport_minutes": 45, "goals_completed": 2}], "worst_days": [], "sample_size": 25, "reliability": "interesting_trend"}
  },
  {
    "name": "lifeanalytics.activity_impact",
    "description": "Compare les jours avec et sans un type d'activité et calcule les écarts de score, sommeil et écran.",
    "isReadOnly": true,
    "http": {"method": "POST", "url": "https://lifeanalytics.baptistegaston.com/api/internal/relai/tools/activity-impact", "headers": {"Authorization": "Bearer ${LIFEANALYTICS_RELAI_TOOL_TOKEN}", "Content-Type": "application/json"}},
    "inputSchema": {"type": "object", "properties": {"context_token": {"type": "string"}, "activity_type": {"type": "string"}, "start": {"type": "string", "format": "date"}, "end": {"type": "string", "format": "date"}}, "required": ["context_token", "activity_type", "start", "end"], "additionalProperties": false},
    "exampleInput": {"context_token": "temporary_context_token", "activity_type": "sport", "start": "2026-06-04", "end": "2026-07-03"},
    "exampleOutput": {"days_with_activity": 8, "days_without_activity": 22, "score_average_with": 7.8, "score_average_without": 6.9, "score_difference": 0.9, "reliability": "moderate"}
  },
  {
    "name": "lifeanalytics.deepwork_impact",
    "description": "Compare les jours avec et sans deepwork et leurs scores, activités et objectifs.",
    "isReadOnly": true,
    "http": {"method": "POST", "url": "https://lifeanalytics.baptistegaston.com/api/internal/relai/tools/deepwork-impact", "headers": {"Authorization": "Bearer ${LIFEANALYTICS_RELAI_TOOL_TOKEN}", "Content-Type": "application/json"}},
    "inputSchema": {"type": "object", "properties": {"context_token": {"type": "string"}, "start": {"type": "string", "format": "date"}, "end": {"type": "string", "format": "date"}}, "required": ["context_token", "start", "end"], "additionalProperties": false},
    "exampleInput": {"context_token": "temporary_context_token", "start": "2026-06-04", "end": "2026-07-03"},
    "exampleOutput": {"days_with_deepwork": 10, "days_without_deepwork": 20, "score_average_with": 7.6, "score_average_without": 7.0, "goals_completed_average_with": 1.4, "reliability": "moderate"}
  },
  {
    "name": "lifeanalytics.sleep_score_relation",
    "description": "Regroupe les jours par durée de sommeil et compare les scores du jour et du lendemain.",
    "isReadOnly": true,
    "http": {"method": "POST", "url": "https://lifeanalytics.baptistegaston.com/api/internal/relai/tools/sleep-score-relation", "headers": {"Authorization": "Bearer ${LIFEANALYTICS_RELAI_TOOL_TOKEN}", "Content-Type": "application/json"}},
    "inputSchema": {"type": "object", "properties": {"context_token": {"type": "string"}, "start": {"type": "string", "format": "date"}, "end": {"type": "string", "format": "date"}}, "required": ["context_token", "start", "end"], "additionalProperties": false},
    "exampleInput": {"context_token": "temporary_context_token", "start": "2026-06-04", "end": "2026-07-03"},
    "exampleOutput": {"sleep_average_minutes": 446, "groups": {"short": {"days": 6, "score_average": 6.4}, "adequate": {"days": 18, "score_average": 7.5}}, "next_day_apparent_impact": {"pair_count": 23}, "reliability": "moderate"}
  },
  {
    "name": "lifeanalytics.phone_score_relation",
    "description": "Compare scores et déverrouillages entre jours à écran faible et élevé.",
    "isReadOnly": true,
    "http": {"method": "POST", "url": "https://lifeanalytics.baptistegaston.com/api/internal/relai/tools/phone-score-relation", "headers": {"Authorization": "Bearer ${LIFEANALYTICS_RELAI_TOOL_TOKEN}", "Content-Type": "application/json"}},
    "inputSchema": {"type": "object", "properties": {"context_token": {"type": "string"}, "start": {"type": "string", "format": "date"}, "end": {"type": "string", "format": "date"}}, "required": ["context_token", "start", "end"], "additionalProperties": false},
    "exampleInput": {"context_token": "temporary_context_token", "start": "2026-06-04", "end": "2026-07-03"},
    "exampleOutput": {"screen_time_average_minutes": 210, "low_screen_days": 14, "high_screen_days": 13, "score_average_low_screen": 7.6, "score_average_high_screen": 6.8, "reliability": "moderate"}
  },
  {
    "name": "lifeanalytics.metric_correlations",
    "description": "Calcule côté Laravel les corrélations de Pearson simples entre métriques journalières.",
    "isReadOnly": true,
    "http": {"method": "POST", "url": "https://lifeanalytics.baptistegaston.com/api/internal/relai/tools/metric-correlations", "headers": {"Authorization": "Bearer ${LIFEANALYTICS_RELAI_TOOL_TOKEN}", "Content-Type": "application/json"}},
    "inputSchema": {"type": "object", "properties": {"context_token": {"type": "string"}, "start": {"type": "string", "format": "date"}, "end": {"type": "string", "format": "date"}}, "required": ["context_token", "start", "end"], "additionalProperties": false},
    "exampleInput": {"context_token": "temporary_context_token", "start": "2026-06-04", "end": "2026-07-03"},
    "exampleOutput": {"correlations": [{"metric_a": "daily_score", "metric_b": "sleep", "coefficient": 0.58, "strength": "moderate", "sample_size": 24, "reliability": "moderate"}], "warning": "Une corrélation ne démontre jamais une causalité."}
  },
  {
    "name": "lifeanalytics.day_detail",
    "description": "Retourne le détail agrégé read-only d'un jour autorisé, ses notes et ses flags importants.",
    "isReadOnly": true,
    "http": {"method": "POST", "url": "https://lifeanalytics.baptistegaston.com/api/internal/relai/tools/day-detail", "headers": {"Authorization": "Bearer ${LIFEANALYTICS_RELAI_TOOL_TOKEN}", "Content-Type": "application/json"}},
    "inputSchema": {"type": "object", "properties": {"context_token": {"type": "string"}, "date": {"type": "string", "format": "date"}}, "required": ["context_token", "date"], "additionalProperties": false},
    "exampleInput": {"context_token": "temporary_context_token", "date": "2026-07-03"},
    "exampleOutput": {"date": "2026-07-03", "day": {"final_score": 7.8, "sleep_minutes": 470, "phone_screen_minutes": 180}, "flags": ["active_day", "goals_completed"]}
  },
  {
    "name": "lifeanalytics.timeline",
    "description": "Retourne une série temporelle journalière simplifiée pour les métriques autorisées.",
    "isReadOnly": true,
    "http": {"method": "POST", "url": "https://lifeanalytics.baptistegaston.com/api/internal/relai/tools/timeline", "headers": {"Authorization": "Bearer ${LIFEANALYTICS_RELAI_TOOL_TOKEN}", "Content-Type": "application/json"}},
    "inputSchema": {"type": "object", "properties": {"context_token": {"type": "string"}, "start": {"type": "string", "format": "date"}, "end": {"type": "string", "format": "date"}, "metrics": {"type": "array", "minItems": 1, "maxItems": 12, "items": {"type": "string", "enum": ["daily_score", "mental_score", "physical_score", "emotional_score", "sleep_hours", "hydration_ml", "screen_time", "unlocks", "activity_minutes", "sport_minutes", "deepwork_minutes", "goals_completed"]}}}, "required": ["context_token", "start", "end", "metrics"], "additionalProperties": false},
    "exampleInput": {"context_token": "temporary_context_token", "start": "2026-06-04", "end": "2026-07-03", "metrics": ["daily_score", "sleep_hours", "screen_time", "sport_minutes"]},
    "exampleOutput": {"metrics": ["daily_score", "sleep_hours", "screen_time", "sport_minutes"], "rows": [{"date": "2026-06-04", "daily_score": 7.2, "sleep_hours": 7.4, "screen_time": 210, "sport_minutes": 0}]}
  }
]
