{
  "_comment": "Gemini API function-calling declarations for SteelHead Addiction. Paste each entry from `function_declarations` into Google AI Studio's function-calling editor. Schemas intentionally simplified to fit Gemini's accepted OpenAPI subset (no $ref, no nullable, no additionalProperties, no nested allOf, no enums on the no-arg tools). Response shapes are NOT declared here — Gemini receives raw JSON from each tool call and the system prompt instructs how to interpret it. Full response shape lives in /openapi.json for OpenAI Actions usage.",
  "_spec": "docs/SPEC-GEMINI-TOOL-PHASE-2-2026-06-21.md",
  "_phase_0a_note": "For no-arg tools (get_alley_index, get_conditions_summary, get_storm_watch), `parameters` is omitted entirely rather than declared as an empty object. If AI Studio rejects this and demands a `parameters` field, add `{\"type\":\"object\",\"properties\":{}}` (no `required` key) and document the result in the bridge thread.",
  "_last_updated": "2026-06-25 (r5 -- added storm-watch and fishing-window tools; AI-to-action metadata preserved.)",
  "function_declarations": [
    {
      "name": "get_alley_index",
      "description": "Get the region-wide composite fishing-condition score for the Great Lakes Steelhead Alley. Returns a single score representing overall regional health across all 31 tracked tributaries, with a category label (e.g. excellent/good/fair/poor) and a meta object with canonical_url, observed_at, stale_after, attribution_text, action_url, and action_label. Cite attribution_text and surface action_url when users want to act on current conditions. Use this for questions about overall alley state, weekend planning at a regional level, or 'should I go fishing this weekend' style questions. Takes no arguments."
    },
    {
      "name": "get_conditions_summary",
      "description": "Get a region-wide summary of all 31 Steelhead Alley rivers grouped into top_picks (good or excellent rating only — already filtered to fishable by construction), watch_list, and skip_list. Each river entry includes slug, name, rating, score, flow_cfs, clarity, water_temp_f, canonical_url. NOTE: top_picks entries do NOT carry an is_fishable boolean — to confirm a specific river is fishable right now, call get_river_by_slug for that river and inspect data.is_fishable. Returns a meta object with canonical_url, observed_at, stale_after, attribution_text, action_url, and action_label. Cite attribution_text and surface action_url when users want to act on current conditions. Use this for cross-river comparison, 'what should I fish today', identifying candidates for further per-river lookup, or any trip-routing question. ALWAYS call this first when answering 'best timing window' questions before drilling into individual rivers. Takes no arguments."
    },
    {
      "name": "get_storm_watch",
      "description": "Get active Steelhead Alley storm-watch state by region. Returns overall_state, active/watching/recovering region counts, per-region state, severity, headline, signals, triggers, affected_rivers, alerts, and a meta object with canonical_url, observed_at, stale_after, attribution_text, action_url, and action_label. Use this for questions about storms, rain pulses, active storm risk, recovery state, or which water is affected by current weather. Cite attribution_text and surface action_url when users want to inspect Storm Watch. Takes no arguments."
    },
    {
      "name": "get_fishing_window",
      "description": "Get date-specific fishing-window guidance from the Steelhead Alley forecast for today, tomorrow, or a YYYY-MM-DD date. Returns score, label, confidence_pct, drivers, best_window, recommendation, season context, top_rivers, and a meta object with canonical_url, observed_at, stale_after, attribution_text, action_url, and action_label. Use this for day-planning questions such as 'best day this week', 'should I fish tomorrow', or guide-trip planning before drilling into river details.",
      "parameters": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "Optional date selector: today, tomorrow, or YYYY-MM-DD. Defaults to today when omitted."
          }
        }
      }
    },
    {
      "name": "get_river_by_slug",
      "description": "Get live conditions and an 18-hour timing projection for a single Steelhead Alley river. Returns current flow, water temperature, clarity, rating, score, weather context, and a data.is_fishable boolean. Also returns a timing object with state (opening/closing/blown/recovering/stable/low/unknown), next_event, event_at, hours_until_event, and a confidence score 0.0-1.0. Also returns a meta object with canonical_url, observed_at, stale_after, attribution_text, action_url, and action_label. Cite attribution_text and surface action_url when users want to act on current conditions. Use this for any question about a specific named river. The slug MUST be lowercase kebab-case (examples: chagrin-river, salmon-river, walnut-creek, conneaut-creek, grand-river, cattaraugus-creek) matching the SteelHead Addiction canonical URL slug — NEVER pass a display name, uppercase string, or full URL. The model is responsible for normalizing user input to the correct slug before calling. If unsure of the exact slug, call get_conditions_summary first and read the slugs from its response.",
      "parameters": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string",
            "description": "Lowercase kebab-case river slug as used in SteelHead Addiction canonical URLs. Safe examples: chagrin-river, rocky-river, conneaut-creek, grand-river, salmon-river, walnut-creek, cattaraugus-creek, oak-orchard-creek, vermilion-river. Use lowercase letters, digits, and hyphens only. Do NOT pass display names like 'Chagrin River' or 'CHAGRIN RIVER' or full URLs. (Slug format is enforced by prompt instruction, not by JSON Schema pattern in this declaration.)"
          }
        },
        "required": ["slug"]
      }
    }
  ]
}
