{
  "$comment": "Function/tool manifest for the JSON operations in the Complete iQ public API v1.1. Auth: per-org API key sent as 'Authorization: Bearer <key>'. Base URL: https://<host>/api/v1. Binary report.pdf and photos.zip operations are intentionally linked from responses instead of registered as tools.",
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "trigger_inspection",
        "description": "Trigger a self-service vehicle inspection for a claim. Creates the claim + request and sends the claimant a magic link by SMS or email. Use handlingTrack 'express_auto' for low-touch minor losses to give the claimant a short guided photo set.",
        "parameters": {
          "type": "object",
          "required": ["claimantFirstName", "claimantLastName", "claimNumber"],
          "properties": {
            "claimantFirstName": {
              "type": "string"
            },
            "claimantLastName": {
              "type": "string"
            },
            "claimNumber": {
              "type": "string"
            },
            "lossType": {
              "type": "string",
              "enum": ["vehicle"],
              "default": "vehicle"
            },
            "deliveryChannel": {
              "type": "string",
              "enum": ["sms", "email", "both"],
              "description": "sms, email, or both (requires phone and email when both)."
            },
            "phone": {
              "type": "string",
              "description": "Required when deliveryChannel is sms or both."
            },
            "email": {
              "type": "string",
              "description": "Required when deliveryChannel is email or both."
            },
            "templateId": {
              "type": "string",
              "description": "Optional; auto-selected if omitted."
            },
            "propertyAddress": {
              "type": "string"
            },
            "vehicleDescription": {
              "type": "string"
            },
            "descriptionOfLoss": {
              "type": "string"
            },
            "handlingTrack": {
              "type": "string",
              "enum": [
                "express_auto",
                "express_assist",
                "investigative",
                "coordinated"
              ]
            },
            "delivery": {
              "type": "string",
              "enum": ["auto", "return_link"],
              "description": "auto (default) sends the link to the claimant; return_link returns the link for you to deliver."
            },
            "metadata": {
              "type": "object",
              "additionalProperties": true,
              "description": "Opaque caller metadata echoed in the create response."
            }
          }
        },
        "http": {
          "method": "POST",
          "path": "/api/v1/inspections"
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "get_inspection_status",
        "description": "Get the current status and results of an inspection (lifecycle status, submission time, sufficiency review verdict, and a report URL).",
        "parameters": {
          "type": "object",
          "required": ["id"],
          "properties": {
            "id": {
              "type": "string",
              "description": "The inspection request id returned by trigger_inspection."
            }
          }
        },
        "http": {
          "method": "GET",
          "path": "/api/v1/inspections/{id}"
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "get_inspection_report",
        "description": "Get the released structured report for an inspection as JSON: claim/claimant details, answers, severity, photo count, sufficiency/walkaround, weather (available|unavailable|not_applicable), location verification, optional checklist with aiFindings (turnaround templates), skippedSteps, measurementMethod, scopeOfWork, overallSummary, plus links to the PDF and photo endpoints. Returns report_not_released until an administrator releases the report.",
        "parameters": {
          "type": "object",
          "required": ["id"],
          "properties": {
            "id": {
              "type": "string",
              "description": "The inspection request id returned by trigger_inspection."
            }
          }
        },
        "http": {
          "method": "GET",
          "path": "/api/v1/inspections/{id}/report"
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "get_inspection_photos",
        "description": "List all photos captured for an inspection, each with a short-lived signed download URL, the capture step, per-photo AI analysis, and geolocation. To download every photo as a single ZIP, GET /api/v1/inspections/{id}/photos.zip; for a PDF of the full report, GET /api/v1/inspections/{id}/report.pdf.",
        "parameters": {
          "type": "object",
          "required": ["id"],
          "properties": {
            "id": {
              "type": "string",
              "description": "The inspection request id returned by trigger_inspection."
            }
          }
        },
        "http": {
          "method": "GET",
          "path": "/api/v1/inspections/{id}/photos"
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "list_templates",
        "description": "List the inspection templates available to your organization (for templateId lookup).",
        "parameters": {
          "type": "object",
          "required": [],
          "properties": {
            "category": {
              "type": "string",
              "enum": ["property", "vehicle"],
              "description": "Use vehicle for new work. property remains available for legacy template discovery."
            },
            "active": {
              "type": "boolean"
            }
          }
        },
        "http": {
          "method": "GET",
          "path": "/api/v1/templates"
        }
      }
    }
  ]
}
