{
  "$id": "https://agenticinsuranceprotocol.org/schemas/0.1/tools.json",
  "title": "Agentic Insurance Protocol (AIP), draft 0.1: MCP tool definitions",
  "description": "The MCP definition of each tool of a seller's server and of the registry, as tools/list returns it. Generated from schema.ts and registry/src/schema.ts. Do not edit by hand.",
  "servers": {
    "org.agenticinsuranceprotocol/aip": {
      "tools": [
        {
          "name": "get_distributor",
          "description": "Who sells: the legal name, the domain, the licences and the AIP settings of this seller. The licences are a claim. Check them with the AIP registry.",
          "inputSchema": {
            "type": "object",
            "description": "Params of `get_distributor`. No params."
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "$ref": "#/$defs/GetDistributorResult"
              },
              {
                "type": "object",
                "properties": {
                  "error": {
                    "$ref": "#/$defs/AipError"
                  }
                },
                "required": [
                  "error"
                ]
              }
            ],
            "$defs": {
              "AipError": {
                "type": "object",
                "properties": {
                  "code": {
                    "$ref": "#/$defs/AipErrorCode"
                  },
                  "message": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/FieldIssue"
                    }
                  },
                  "retryable": {
                    "type": "boolean",
                    "description": "True when the same call can succeed later with no change, as for `rate_limited` and `unavailable`."
                  },
                  "retry_after_seconds": {
                    "type": "number",
                    "description": "When the agent SHOULD retry, when `retryable` is true."
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "description": "Error returned in an MCP tool result with `isError: true`, in `structuredContent.error`, with the same JSON as text in `content`."
              },
              "AipErrorCode": {
                "type": "string",
                "enum": [
                  "invalid_params",
                  "rate_limited",
                  "unavailable",
                  "not_supported",
                  "not_licensed",
                  "product_not_found",
                  "answers_invalid",
                  "offer_not_found",
                  "offer_expired",
                  "application_not_found"
                ]
              },
              "AipSettings": {
                "type": "object",
                "properties": {
                  "version": {
                    "type": "string",
                    "description": "Protocol version the server implements, \"major.minor\", for example \"0.1\". Until 1.0, a client MUST treat a different minor version as a different protocol."
                  },
                  "conformance_level": {
                    "$ref": "#/$defs/ConformanceLevel"
                  },
                  "lines": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/ProductLine"
                    },
                    "description": "Product lines the server can quote."
                  },
                  "countries": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/CountryCode"
                    },
                    "description": "Countries where the server's products are sold."
                  }
                },
                "required": [
                  "version",
                  "conformance_level",
                  "lines",
                  "countries"
                ],
                "description": "Settings object of the extension. A server puts it under `capabilities.extensions[\"org.agenticinsuranceprotocol/aip\"]` in its MCP `server/discover` response, and in its `AipDocument`."
              },
              "ConformanceLevel": {
                "type": "number",
                "enum": [
                  1,
                  2,
                  3
                ],
                "description": "Conformance level that a seller declares.\n\n- 1 Inform: `get_distributor`, `list_products`\n- 2 Quote: level 1, plus `quote`\n- 3 Subscribe: level 2, plus `submit_application` and `get_operation`\n\nA server that declares a level MUST implement every tool of that level and of the levels below it."
              },
              "CountryCode": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2 country code, upper case.",
                "pattern": "^[A-Z]{2}$"
              },
              "DistributorRole": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ProviderRole"
                  },
                  {
                    "type": "string",
                    "const": "broker"
                  },
                  {
                    "type": "string",
                    "const": "agent"
                  },
                  {
                    "type": "string",
                    "const": "mga"
                  },
                  {
                    "type": "string",
                    "const": "comparator"
                  }
                ],
                "description": "Role of a party in the distribution chain. The provider roles are in `ProviderRole`."
              },
              "FieldIssue": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string"
                  },
                  "issue": {
                    "type": "string",
                    "enum": [
                      "missing",
                      "invalid",
                      "not_accepted"
                    ]
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "field",
                  "issue"
                ]
              },
              "GetDistributorResult": {
                "type": "object",
                "properties": {
                  "legal_name": {
                    "type": "string"
                  },
                  "trading_name": {
                    "type": "string"
                  },
                  "domain": {
                    "type": "string",
                    "description": "Domain the seller controls. It MUST match the server's own domain."
                  },
                  "lei": {
                    "$ref": "#/$defs/Lei",
                    "description": "Legal Entity Identifier, when the seller has one. The registry uses it to match one company across registers."
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/DistributorRole"
                    }
                  },
                  "licences": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/Licence"
                    },
                    "description": "Every licence the seller relies on to sell the listed products."
                  },
                  "countries": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/CountryCode"
                    }
                  },
                  "complaints_url": {
                    "$ref": "#/$defs/Url",
                    "description": "Where a customer can complain. Required by most regulators."
                  },
                  "aip": {
                    "$ref": "#/$defs/AipSettings",
                    "description": "Settings the server declares for AIP."
                  }
                },
                "required": [
                  "legal_name",
                  "domain",
                  "roles",
                  "licences",
                  "countries",
                  "aip"
                ]
              },
              "Lei": {
                "type": "string",
                "description": "Legal Entity Identifier (ISO 17442): 18 letters or digits, then 2 check digits.",
                "pattern": "^[A-Z0-9]{18}[0-9]{2}$"
              },
              "Licence": {
                "type": "object",
                "properties": {
                  "country": {
                    "$ref": "#/$defs/CountryCode"
                  },
                  "regulator": {
                    "type": "string",
                    "description": "Supervising authority, for example \"ACPR\", \"FCA\", or a US state insurance department."
                  },
                  "register": {
                    "type": "string",
                    "description": "Name of the public register, for example \"ORIAS\", \"REGAFI\", \"FCA Register\", \"NIPR\"."
                  },
                  "identifier_type": {
                    "$ref": "#/$defs/RegisterIdentifierType"
                  },
                  "identifier": {
                    "type": "string"
                  },
                  "role": {
                    "$ref": "#/$defs/DistributorRole"
                  },
                  "categories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Register categories, for example ORIAS \"COA\" (insurance broker) or \"AGA\" (tied insurance agent)."
                  },
                  "subdivisions": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/SubdivisionCode"
                    },
                    "description": "Subdivisions where the licence applies, for example US states as ISO 3166-2 codes (\"US-CA\"). Omit when the licence covers the whole country."
                  },
                  "verification_url": {
                    "$ref": "#/$defs/Url",
                    "description": "Public page where anyone can check the entry."
                  }
                },
                "required": [
                  "country",
                  "regulator",
                  "register",
                  "identifier_type",
                  "identifier",
                  "role"
                ],
                "description": "One entry in a public register that gives the right to sell a product, or to carry its risk."
              },
              "ProductLine": {
                "type": "string",
                "description": "Product line. Servers SHOULD use a value of `KnownProductLine`. Other values MUST be lower case with underscores.",
                "pattern": "^[a-z][a-z0-9_]*$"
              },
              "ProviderRole": {
                "type": "string",
                "const": "insurer",
                "description": "Role of the party that carries the risk."
              },
              "RegisterIdentifierType": {
                "type": "string",
                "enum": [
                  "orias_number",
                  "siren",
                  "fca_frn",
                  "npn",
                  "naic_cocode",
                  "lei",
                  "other"
                ],
                "description": "Kind of public register identifier."
              },
              "SubdivisionCode": {
                "type": "string",
                "description": "ISO 3166-2 subdivision code, upper case, for example \"US-CA\" for California.",
                "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
              },
              "Url": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "destructiveHint": false,
            "idempotentHint": true
          },
          "_meta": {
            "org.agenticinsuranceprotocol/aip": {
              "level": 1
            }
          }
        },
        {
          "name": "list_products",
          "description": "The products, each with its underwriting scope, its tiers and its documents, and no price. Filter by country, subdivision, line, insured family and kind. Read the conditions of the scope before you ask the customer any question.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "country": {
                "$ref": "#/$defs/CountryCode"
              },
              "subdivision": {
                "$ref": "#/$defs/SubdivisionCode",
                "description": "Products that cover this subdivision."
              },
              "line": {
                "$ref": "#/$defs/ProductLine"
              },
              "insured_family": {
                "$ref": "#/$defs/InsuredFamily",
                "description": "Products that insure this family."
              },
              "insured_kind": {
                "type": "string",
                "description": "Products that insure this kind of `insured_family`, for example \"cat\". A product matches when its insured type of that family lists the kind, or lists no kinds. Give it with `insured_family`."
              },
              "language": {
                "$ref": "#/$defs/LanguageTag",
                "description": "Language of the text in the result: names, summaries, conditions and documents."
              },
              "cursor": {
                "type": "string"
              }
            },
            "description": "Params of `list_products`. Each filter is optional. The server MUST return only the products whose line and underwriting scope match every filter given. With `country`, `subdivision`, `insured_family` and `insured_kind`, the filters cover the whole structured part of the scope, so the agent has only the `conditions` left to check.",
            "$defs": {
              "CountryCode": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2 country code, upper case.",
                "pattern": "^[A-Z]{2}$"
              },
              "InsuredFamily": {
                "type": "string",
                "description": "Family of what a product insures: a kind of person, or a kind of good. Servers SHOULD use a value of `KnownInsuredFamily`. Other values MUST be lower case with underscores.",
                "pattern": "^[a-z][a-z0-9_]*$"
              },
              "LanguageTag": {
                "type": "string",
                "description": "BCP 47 language tag, for example `fr` or `en-GB`.",
                "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$"
              },
              "ProductLine": {
                "type": "string",
                "description": "Product line. Servers SHOULD use a value of `KnownProductLine`. Other values MUST be lower case with underscores.",
                "pattern": "^[a-z][a-z0-9_]*$"
              },
              "SubdivisionCode": {
                "type": "string",
                "description": "ISO 3166-2 subdivision code, upper case, for example \"US-CA\" for California.",
                "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "$ref": "#/$defs/ListProductsResult"
              },
              {
                "type": "object",
                "properties": {
                  "error": {
                    "$ref": "#/$defs/AipError"
                  }
                },
                "required": [
                  "error"
                ]
              }
            ],
            "$defs": {
              "AipError": {
                "type": "object",
                "properties": {
                  "code": {
                    "$ref": "#/$defs/AipErrorCode"
                  },
                  "message": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/FieldIssue"
                    }
                  },
                  "retryable": {
                    "type": "boolean",
                    "description": "True when the same call can succeed later with no change, as for `rate_limited` and `unavailable`."
                  },
                  "retry_after_seconds": {
                    "type": "number",
                    "description": "When the agent SHOULD retry, when `retryable` is true."
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "description": "Error returned in an MCP tool result with `isError: true`, in `structuredContent.error`, with the same JSON as text in `content`."
              },
              "AipErrorCode": {
                "type": "string",
                "enum": [
                  "invalid_params",
                  "rate_limited",
                  "unavailable",
                  "not_supported",
                  "not_licensed",
                  "product_not_found",
                  "answers_invalid",
                  "offer_not_found",
                  "offer_expired",
                  "application_not_found"
                ]
              },
              "CountryCode": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2 country code, upper case.",
                "pattern": "^[A-Z]{2}$"
              },
              "CoverLimit": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Stable key, for example \"vet_costs_per_year\"."
                  },
                  "label": {
                    "type": "string"
                  },
                  "limit": {
                    "$ref": "#/$defs/Money"
                  },
                  "reimbursement_rate": {
                    "type": "number",
                    "description": "Share of a claim paid back, from 0 to 1. Used by pet and health cover."
                  }
                },
                "required": [
                  "key",
                  "label"
                ]
              },
              "CoverSummary": {
                "type": "object",
                "properties": {
                  "included": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Covers included, as short labels."
                  },
                  "limits": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/CoverLimit"
                    }
                  },
                  "excess": {
                    "$ref": "#/$defs/Money"
                  },
                  "excess_basis": {
                    "$ref": "#/$defs/ExcessBasis",
                    "description": "What the excess applies to. Required when `excess` is above zero."
                  },
                  "main_exclusions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Main exclusions. The full list is in the documents."
                  },
                  "waiting_periods": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/WaitingPeriod"
                    },
                    "description": "The waiting period of each cover. Each `applies_to` MUST be a label of `included`. Give 0 days for a cover that starts at once, so that the wait of an illness does not read as the wait of an accident."
                  }
                },
                "required": [
                  "included"
                ]
              },
              "CurrencyCode": {
                "type": "string",
                "description": "ISO 4217 currency code.",
                "pattern": "^[A-Z]{3}$"
              },
              "Decimal": {
                "type": "string",
                "description": "A decimal number as a string, so that no value is lost to floating point, for example \"12.90\".",
                "pattern": "^-?[0-9]+(\\.[0-9]+)?$"
              },
              "DistributorRole": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ProviderRole"
                  },
                  {
                    "type": "string",
                    "const": "broker"
                  },
                  {
                    "type": "string",
                    "const": "agent"
                  },
                  {
                    "type": "string",
                    "const": "mga"
                  },
                  {
                    "type": "string",
                    "const": "comparator"
                  }
                ],
                "description": "Role of a party in the distribution chain. The provider roles are in `ProviderRole`."
              },
              "DocumentType": {
                "type": "string",
                "enum": [
                  "pre_contract_information",
                  "terms_of_business",
                  "other",
                  "ipid",
                  "general_conditions",
                  "demands_and_needs"
                ],
                "description": "Kind of document."
              },
              "ExcessBasis": {
                "type": "string",
                "enum": [
                  "per_claim",
                  "per_year",
                  "per_condition"
                ],
                "description": "What one excess applies to."
              },
              "FieldIssue": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string"
                  },
                  "issue": {
                    "type": "string",
                    "enum": [
                      "missing",
                      "invalid",
                      "not_accepted"
                    ]
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "field",
                  "issue"
                ]
              },
              "Geography": {
                "type": "object",
                "properties": {
                  "countries": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/CountryCode"
                    },
                    "description": "Countries the product covers. At least one.",
                    "minItems": 1
                  },
                  "subdivisions": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/SubdivisionCode"
                    },
                    "description": "Subdivisions the product covers, for example US states. Each one MUST belong to a country in `countries`. The product covers the whole of each country that has no subdivision in this list."
                  }
                },
                "required": [
                  "countries"
                ],
                "description": "Where the insured person lives, or where the insured good is."
              },
              "InsuranceDocument": {
                "type": "object",
                "properties": {
                  "type": {
                    "$ref": "#/$defs/DocumentType"
                  },
                  "title": {
                    "type": "string"
                  },
                  "url": {
                    "$ref": "#/$defs/Url"
                  },
                  "required_before_commitment": {
                    "type": "boolean",
                    "description": "True when the law requires that the customer receives this document before they commit, for example the IPID."
                  }
                },
                "required": [
                  "type",
                  "title",
                  "url",
                  "required_before_commitment"
                ],
                "description": "A document of a product or of an offer. `list_products` gives the documents of each product in `Product.documents`, and `quote` the documents of each offer in `Offer.documents`."
              },
              "InsuredFamily": {
                "type": "string",
                "description": "Family of what a product insures: a kind of person, or a kind of good. Servers SHOULD use a value of `KnownInsuredFamily`. Other values MUST be lower case with underscores.",
                "pattern": "^[a-z][a-z0-9_]*$"
              },
              "InsuredType": {
                "type": "object",
                "properties": {
                  "family": {
                    "$ref": "#/$defs/InsuredFamily"
                  },
                  "kinds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Kinds that the product covers, for example \"cat\" and \"dog\". Omit when it covers every kind."
                  }
                },
                "required": [
                  "family"
                ],
                "description": "A family of insured, and the kinds of it that a product covers."
              },
              "Lei": {
                "type": "string",
                "description": "Legal Entity Identifier (ISO 17442): 18 letters or digits, then 2 check digits.",
                "pattern": "^[A-Z0-9]{18}[0-9]{2}$"
              },
              "Licence": {
                "type": "object",
                "properties": {
                  "country": {
                    "$ref": "#/$defs/CountryCode"
                  },
                  "regulator": {
                    "type": "string",
                    "description": "Supervising authority, for example \"ACPR\", \"FCA\", or a US state insurance department."
                  },
                  "register": {
                    "type": "string",
                    "description": "Name of the public register, for example \"ORIAS\", \"REGAFI\", \"FCA Register\", \"NIPR\"."
                  },
                  "identifier_type": {
                    "$ref": "#/$defs/RegisterIdentifierType"
                  },
                  "identifier": {
                    "type": "string"
                  },
                  "role": {
                    "$ref": "#/$defs/DistributorRole"
                  },
                  "categories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Register categories, for example ORIAS \"COA\" (insurance broker) or \"AGA\" (tied insurance agent)."
                  },
                  "subdivisions": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/SubdivisionCode"
                    },
                    "description": "Subdivisions where the licence applies, for example US states as ISO 3166-2 codes (\"US-CA\"). Omit when the licence covers the whole country."
                  },
                  "verification_url": {
                    "$ref": "#/$defs/Url",
                    "description": "Public page where anyone can check the entry."
                  }
                },
                "required": [
                  "country",
                  "regulator",
                  "register",
                  "identifier_type",
                  "identifier",
                  "role"
                ],
                "description": "One entry in a public register that gives the right to sell a product, or to carry its risk."
              },
              "ListProductsResult": {
                "type": "object",
                "properties": {
                  "products": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/Product"
                    }
                  },
                  "next_cursor": {
                    "type": "string"
                  }
                },
                "required": [
                  "products"
                ]
              },
              "Money": {
                "type": "object",
                "properties": {
                  "amount": {
                    "$ref": "#/$defs/Decimal"
                  },
                  "currency": {
                    "$ref": "#/$defs/CurrencyCode"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "Premium": {
                "type": "object",
                "properties": {
                  "amount": {
                    "$ref": "#/$defs/Money"
                  },
                  "period": {
                    "$ref": "#/$defs/PremiumPeriod"
                  },
                  "taxes_included": {
                    "type": "boolean",
                    "description": "True when taxes and mandatory levies are in `amount`."
                  }
                },
                "required": [
                  "amount",
                  "period",
                  "taxes_included"
                ]
              },
              "PremiumPeriod": {
                "type": "string",
                "enum": [
                  "month",
                  "quarter",
                  "half_year",
                  "year",
                  "single"
                ]
              },
              "Product": {
                "type": "object",
                "properties": {
                  "product_id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "line": {
                    "$ref": "#/$defs/ProductLine"
                  },
                  "provider": {
                    "$ref": "#/$defs/ProviderRef",
                    "description": "Provider of the product, when it is not the seller."
                  },
                  "underwriting_scope": {
                    "$ref": "#/$defs/UnderwritingScope",
                    "description": "The risks the product can cover. A product MUST publish it."
                  },
                  "summary": {
                    "type": "string"
                  },
                  "tiers": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/ProductTier"
                    },
                    "description": "The tiers of the product, each with its cover and no price, for example \"Bronze\", \"Silver\" and \"Gold\". A product with one level of cover has one tier. `quote` gives one offer for each tier that can cover the customer.",
                    "minItems": 1
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/ProductOption"
                    },
                    "description": "Options the customer can add to a tier (optional covers, extra services)."
                  },
                  "documents": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/InsuranceDocument"
                    },
                    "description": "The documents of the product, such as the IPID and the general conditions."
                  }
                },
                "required": [
                  "product_id",
                  "name",
                  "line",
                  "underwriting_scope",
                  "summary",
                  "tiers",
                  "documents"
                ]
              },
              "ProductLine": {
                "type": "string",
                "description": "Product line. Servers SHOULD use a value of `KnownProductLine`. Other values MUST be lower case with underscores.",
                "pattern": "^[a-z][a-z0-9_]*$"
              },
              "ProductOption": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "price": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Premium"
                      },
                      {
                        "$ref": "#/$defs/Money"
                      }
                    ],
                    "description": "Cost of the option, in the same form as the main price."
                  }
                },
                "required": [
                  "key",
                  "label"
                ],
                "description": "An option the customer can add (optional cover, extra service)."
              },
              "ProductTier": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Stable key, unique in the product, for example \"gold\". `Offer.tier` gives it."
                  },
                  "name": {
                    "type": "string",
                    "description": "Name of the tier, for example \"Gold\", \"Tous risques\" or \"Band B\"."
                  },
                  "summary": {
                    "type": "string",
                    "description": "What the tier is for, in plain words."
                  },
                  "cover": {
                    "$ref": "#/$defs/CoverSummary"
                  }
                },
                "required": [
                  "key",
                  "name",
                  "cover"
                ],
                "description": "One level of cover of a product. The price comes only from `quote`, because it depends on the customer."
              },
              "ProviderRef": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "legal_name": {
                    "type": "string"
                  },
                  "role": {
                    "$ref": "#/$defs/ProviderRole"
                  },
                  "domain": {
                    "type": "string",
                    "description": "Domain the provider controls, so that an agent can find it in the registry."
                  },
                  "lei": {
                    "$ref": "#/$defs/Lei",
                    "description": "Legal Entity Identifier, when the provider has one."
                  },
                  "licences": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/Licence"
                    },
                    "description": "The register entries that allow the provider to carry the risk, for example its authorisation as an insurer. At least one.",
                    "minItems": 1
                  }
                },
                "required": [
                  "name",
                  "role",
                  "licences"
                ],
                "description": "The party that carries the risk."
              },
              "ProviderRole": {
                "type": "string",
                "const": "insurer",
                "description": "Role of the party that carries the risk."
              },
              "RegisterIdentifierType": {
                "type": "string",
                "enum": [
                  "orias_number",
                  "siren",
                  "fca_frn",
                  "npn",
                  "naic_cocode",
                  "lei",
                  "other"
                ],
                "description": "Kind of public register identifier."
              },
              "SubdivisionCode": {
                "type": "string",
                "description": "ISO 3166-2 subdivision code, upper case, for example \"US-CA\" for California.",
                "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
              },
              "UnderwritingScope": {
                "type": "object",
                "properties": {
                  "geography": {
                    "$ref": "#/$defs/Geography"
                  },
                  "insured": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/InsuredType"
                    },
                    "description": "What the product insures. At least one.",
                    "minItems": 1
                  },
                  "conditions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The conditions that a machine cannot check, in plain words, for example \"Houses built after 1950 only\" or \"Not for people over 70\". Empty when there are none. An agent SHOULD check them against what the customer said before it quotes, and ask the customer when it is not sure."
                  }
                },
                "required": [
                  "geography",
                  "insured",
                  "conditions"
                ],
                "description": "The risks a product can cover. `list_products` gives it with no customer data, so that an agent can drop a product that cannot cover the customer before it asks a question.\n\n`geography` and `insured` are the structured part. A server MUST NOT return an offer for a risk outside the structured part. An agent MUST NOT send answers to `quote` for a product whose structured part excludes the customer. `conditions` holds the rest."
              },
              "Url": {
                "type": "string",
                "format": "uri"
              },
              "WaitingPeriod": {
                "type": "object",
                "properties": {
                  "applies_to": {
                    "type": "string",
                    "description": "The cover it applies to: a label of `included`, for example \"Illness\"."
                  },
                  "days": {
                    "type": "number",
                    "description": "Days after the start date. 0 when the cover starts at once."
                  }
                },
                "required": [
                  "applies_to",
                  "days"
                ],
                "description": "The days after the start date before a claim for one cover is paid."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "destructiveHint": false,
            "idempotentHint": true
          },
          "_meta": {
            "org.agenticinsuranceprotocol/aip": {
              "level": 1
            }
          }
        },
        {
          "name": "quote",
          "description": "Price a product. Send all the answers you have, each with its source, even none. When answers are missing, the result gives the questions as a JSON Schema and the missing answers. Otherwise it gives the offers, or the reason for no offer. The price of an offer can change after the insurer's checks.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "product_id": {
                "type": "string"
              },
              "answers": {
                "$ref": "#/$defs/Answers",
                "description": "The answers that the agent has. Empty in a first call that has none."
              },
              "answer_sources": {
                "$ref": "#/$defs/AnswerSources",
                "description": "Where each answer comes from, keyed like `answers`."
              },
              "options": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Options the customer wants priced, by key (optional covers, extra services)."
              },
              "language": {
                "$ref": "#/$defs/LanguageTag"
              }
            },
            "required": [
              "product_id",
              "answers",
              "answer_sources"
            ],
            "description": "Params of `quote`.\n\nThe agent sends the answers that it has, even none. When answers are missing, the server returns `needs_input` with the questions of the product and the missing fields. The agent asks the customer, and calls `quote` again with all the answers. This one loop replaces the tools that give the questions, and the multi-step flow tools (`action`, `stateUpdates`, `sessionId`) that most servers use.\n\nThe server keeps the answers and their sources with each offer, until its `valid_until`. `submit_application` takes them from the offer, so the agent does not send them again.",
            "$defs": {
              "AnswerSource": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "origin": {
                        "type": "string",
                        "const": "customer"
                      },
                      "validated_by_customer": {
                        "type": "boolean",
                        "const": true
                      }
                    },
                    "required": [
                      "origin",
                      "validated_by_customer"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "origin": {
                        "type": "string",
                        "const": "agent"
                      },
                      "validated_by_customer": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "origin",
                      "validated_by_customer"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "origin": {
                        "type": "string",
                        "const": "third_party"
                      },
                      "validated_by_customer": {
                        "type": "boolean"
                      },
                      "source_name": {
                        "type": "string",
                        "description": "The third party, by its kind and country, for example \"vehicle register (FR)\"."
                      }
                    },
                    "required": [
                      "origin",
                      "validated_by_customer",
                      "source_name"
                    ]
                  }
                ],
                "description": "Where one answer comes from. `validated_by_customer` is true when the customer confirmed this value before the agent sent it. It is always true when the customer gave the value. An agent MUST NOT set `validated_by_customer` to true when the customer did not validate that answer."
              },
              "AnswerSources": {
                "type": "object",
                "additionalProperties": {
                  "$ref": "#/$defs/AnswerSource"
                },
                "description": "The source of each answer, keyed like `answers`. An agent MUST give a source for each answer, and no source for a key that has no answer. Otherwise the server returns `answers_invalid`."
              },
              "Answers": {
                "type": "object",
                "additionalProperties": {},
                "description": "Answers keyed by property name in `answers_schema`."
              },
              "LanguageTag": {
                "type": "string",
                "description": "BCP 47 language tag, for example `fr` or `en-GB`.",
                "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$"
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "$ref": "#/$defs/QuoteResult"
              },
              {
                "type": "object",
                "properties": {
                  "error": {
                    "$ref": "#/$defs/AipError"
                  }
                },
                "required": [
                  "error"
                ]
              }
            ],
            "$defs": {
              "AipError": {
                "type": "object",
                "properties": {
                  "code": {
                    "$ref": "#/$defs/AipErrorCode"
                  },
                  "message": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/FieldIssue"
                    }
                  },
                  "retryable": {
                    "type": "boolean",
                    "description": "True when the same call can succeed later with no change, as for `rate_limited` and `unavailable`."
                  },
                  "retry_after_seconds": {
                    "type": "number",
                    "description": "When the agent SHOULD retry, when `retryable` is true."
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "description": "Error returned in an MCP tool result with `isError: true`, in `structuredContent.error`, with the same JSON as text in `content`."
              },
              "AipErrorCode": {
                "type": "string",
                "enum": [
                  "invalid_params",
                  "rate_limited",
                  "unavailable",
                  "not_supported",
                  "not_licensed",
                  "product_not_found",
                  "answers_invalid",
                  "offer_not_found",
                  "offer_expired",
                  "application_not_found"
                ]
              },
              "AnswersSchema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "const": "object"
                  },
                  "properties": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "object",
                      "additionalProperties": {}
                    }
                  },
                  "required": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                },
                "required": [
                  "type",
                  "properties"
                ],
                "additionalProperties": {},
                "description": "A JSON Schema (2020-12) object that describes the questions of a product. Each property is one question. Each property SHOULD have a `description` in plain words, so that the agent can ask the question.\n\nA question MUST NOT ask for an identity number, a bank account or card number, a tax number, health data of a person or a password. The seller asks for them on its own page: the approval page of `submit_application`, or the `handoff_url` of an offer."
              },
              "CountryCode": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2 country code, upper case.",
                "pattern": "^[A-Z]{2}$"
              },
              "CoverLimit": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Stable key, for example \"vet_costs_per_year\"."
                  },
                  "label": {
                    "type": "string"
                  },
                  "limit": {
                    "$ref": "#/$defs/Money"
                  },
                  "reimbursement_rate": {
                    "type": "number",
                    "description": "Share of a claim paid back, from 0 to 1. Used by pet and health cover."
                  }
                },
                "required": [
                  "key",
                  "label"
                ]
              },
              "CoverSummary": {
                "type": "object",
                "properties": {
                  "included": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Covers included, as short labels."
                  },
                  "limits": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/CoverLimit"
                    }
                  },
                  "excess": {
                    "$ref": "#/$defs/Money"
                  },
                  "excess_basis": {
                    "$ref": "#/$defs/ExcessBasis",
                    "description": "What the excess applies to. Required when `excess` is above zero."
                  },
                  "main_exclusions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Main exclusions. The full list is in the documents."
                  },
                  "waiting_periods": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/WaitingPeriod"
                    },
                    "description": "The waiting period of each cover. Each `applies_to` MUST be a label of `included`. Give 0 days for a cover that starts at once, so that the wait of an illness does not read as the wait of an accident."
                  }
                },
                "required": [
                  "included"
                ]
              },
              "CurrencyCode": {
                "type": "string",
                "description": "ISO 4217 currency code.",
                "pattern": "^[A-Z]{3}$"
              },
              "DateTimeString": {
                "type": "string",
                "description": "Date and time with offset, ISO 8601.",
                "format": "date-time"
              },
              "Decimal": {
                "type": "string",
                "description": "A decimal number as a string, so that no value is lost to floating point, for example \"12.90\".",
                "pattern": "^-?[0-9]+(\\.[0-9]+)?$"
              },
              "DistributorRole": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/ProviderRole"
                  },
                  {
                    "type": "string",
                    "const": "broker"
                  },
                  {
                    "type": "string",
                    "const": "agent"
                  },
                  {
                    "type": "string",
                    "const": "mga"
                  },
                  {
                    "type": "string",
                    "const": "comparator"
                  }
                ],
                "description": "Role of a party in the distribution chain. The provider roles are in `ProviderRole`."
              },
              "DocumentType": {
                "type": "string",
                "enum": [
                  "pre_contract_information",
                  "terms_of_business",
                  "other",
                  "ipid",
                  "general_conditions",
                  "demands_and_needs"
                ],
                "description": "Kind of document."
              },
              "ExcessBasis": {
                "type": "string",
                "enum": [
                  "per_claim",
                  "per_year",
                  "per_condition"
                ],
                "description": "What one excess applies to."
              },
              "Fee": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Stable key, for example \"policy_fee\"."
                  },
                  "label": {
                    "type": "string"
                  },
                  "amount": {
                    "$ref": "#/$defs/Money"
                  },
                  "period": {
                    "$ref": "#/$defs/PremiumPeriod",
                    "description": "How often the customer pays it. `single` for a fee paid once."
                  }
                },
                "required": [
                  "key",
                  "label",
                  "amount",
                  "period"
                ],
                "description": "A fee that the customer pays on top of the premium, for example a policy fee or a broker fee."
              },
              "FieldIssue": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string"
                  },
                  "issue": {
                    "type": "string",
                    "enum": [
                      "missing",
                      "invalid",
                      "not_accepted"
                    ]
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "field",
                  "issue"
                ]
              },
              "InsuranceDocument": {
                "type": "object",
                "properties": {
                  "type": {
                    "$ref": "#/$defs/DocumentType"
                  },
                  "title": {
                    "type": "string"
                  },
                  "url": {
                    "$ref": "#/$defs/Url"
                  },
                  "required_before_commitment": {
                    "type": "boolean",
                    "description": "True when the law requires that the customer receives this document before they commit, for example the IPID."
                  }
                },
                "required": [
                  "type",
                  "title",
                  "url",
                  "required_before_commitment"
                ],
                "description": "A document of a product or of an offer. `list_products` gives the documents of each product in `Product.documents`, and `quote` the documents of each offer in `Offer.documents`."
              },
              "Lei": {
                "type": "string",
                "description": "Legal Entity Identifier (ISO 17442): 18 letters or digits, then 2 check digits.",
                "pattern": "^[A-Z0-9]{18}[0-9]{2}$"
              },
              "Licence": {
                "type": "object",
                "properties": {
                  "country": {
                    "$ref": "#/$defs/CountryCode"
                  },
                  "regulator": {
                    "type": "string",
                    "description": "Supervising authority, for example \"ACPR\", \"FCA\", or a US state insurance department."
                  },
                  "register": {
                    "type": "string",
                    "description": "Name of the public register, for example \"ORIAS\", \"REGAFI\", \"FCA Register\", \"NIPR\"."
                  },
                  "identifier_type": {
                    "$ref": "#/$defs/RegisterIdentifierType"
                  },
                  "identifier": {
                    "type": "string"
                  },
                  "role": {
                    "$ref": "#/$defs/DistributorRole"
                  },
                  "categories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Register categories, for example ORIAS \"COA\" (insurance broker) or \"AGA\" (tied insurance agent)."
                  },
                  "subdivisions": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/SubdivisionCode"
                    },
                    "description": "Subdivisions where the licence applies, for example US states as ISO 3166-2 codes (\"US-CA\"). Omit when the licence covers the whole country."
                  },
                  "verification_url": {
                    "$ref": "#/$defs/Url",
                    "description": "Public page where anyone can check the entry."
                  }
                },
                "required": [
                  "country",
                  "regulator",
                  "register",
                  "identifier_type",
                  "identifier",
                  "role"
                ],
                "description": "One entry in a public register that gives the right to sell a product, or to carry its risk."
              },
              "Money": {
                "type": "object",
                "properties": {
                  "amount": {
                    "$ref": "#/$defs/Decimal"
                  },
                  "currency": {
                    "$ref": "#/$defs/CurrencyCode"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              },
              "NoOffer": {
                "type": "object",
                "properties": {
                  "reason_code": {
                    "$ref": "#/$defs/NoOfferReason"
                  },
                  "message": {
                    "type": "string",
                    "description": "Plain-language explanation the agent can pass to the customer."
                  }
                },
                "required": [
                  "reason_code",
                  "message"
                ],
                "description": "Why no offer is possible."
              },
              "NoOfferReason": {
                "type": "string",
                "description": "Stable reason why no offer is possible. Servers SHOULD use a value of `KnownNoOfferReason`. Other values MUST be lower case with underscores.",
                "pattern": "^[a-z][a-z0-9_]*$"
              },
              "Offer": {
                "type": "object",
                "properties": {
                  "offer_id": {
                    "type": "string"
                  },
                  "product_id": {
                    "type": "string"
                  },
                  "tier": {
                    "type": "string",
                    "description": "The `key` of the tier of the product that this offer prices. The cover of its pricing is the cover of that tier for this customer."
                  },
                  "provider": {
                    "$ref": "#/$defs/ProviderRef"
                  },
                  "pricing": {
                    "$ref": "#/$defs/Pricing",
                    "description": "The price and the cover. A server SHOULD give `cover.excess`, `cover.limits` and `fees`. An empty `limits` means that the cover has no limit."
                  },
                  "valid_until": {
                    "$ref": "#/$defs/DateTimeString",
                    "description": "Last moment the customer can apply for the offer."
                  },
                  "handoff_url": {
                    "$ref": "#/$defs/Url",
                    "description": "Page where the customer continues with this exact offer on the seller's site. A server at level 2 MUST give it, because it takes no application. It MUST be on the domain of the seller or of the provider, and MUST NOT contain personal data."
                  },
                  "documents": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/InsuranceDocument"
                    },
                    "description": "The documents of this offer. A server SHOULD list every document that the customer must receive before they commit."
                  }
                },
                "required": [
                  "offer_id",
                  "product_id",
                  "tier",
                  "provider",
                  "pricing",
                  "valid_until"
                ],
                "description": "One priced offer. A seller can return several offers: one per tier, per provider, or per duration. Each offer prices one tier of its product. Its price can change after the insurer's checks. The firm price is the one that the approval page shows.\n\nWhen a server implements `quote`, an agent MUST take the price, the cover, the limits and the excess that it shows the customer from the offer, and MUST NOT take them from a page made for people."
              },
              "Premium": {
                "type": "object",
                "properties": {
                  "amount": {
                    "$ref": "#/$defs/Money"
                  },
                  "period": {
                    "$ref": "#/$defs/PremiumPeriod"
                  },
                  "taxes_included": {
                    "type": "boolean",
                    "description": "True when taxes and mandatory levies are in `amount`."
                  }
                },
                "required": [
                  "amount",
                  "period",
                  "taxes_included"
                ]
              },
              "PremiumPeriod": {
                "type": "string",
                "enum": [
                  "month",
                  "quarter",
                  "half_year",
                  "year",
                  "single"
                ]
              },
              "Pricing": {
                "type": "object",
                "properties": {
                  "premium": {
                    "$ref": "#/$defs/Premium"
                  },
                  "fees": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/Fee"
                    },
                    "description": "Fees on top of the premium. An empty list means that the customer pays no fee."
                  },
                  "cover": {
                    "$ref": "#/$defs/CoverSummary"
                  },
                  "options": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/ProductOption"
                    },
                    "description": "The options in this price, from the `options` of the quote."
                  }
                },
                "required": [
                  "premium",
                  "cover"
                ],
                "description": "The price of an offer, and the cover it buys."
              },
              "ProductOption": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "price": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Premium"
                      },
                      {
                        "$ref": "#/$defs/Money"
                      }
                    ],
                    "description": "Cost of the option, in the same form as the main price."
                  }
                },
                "required": [
                  "key",
                  "label"
                ],
                "description": "An option the customer can add (optional cover, extra service)."
              },
              "ProviderRef": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "legal_name": {
                    "type": "string"
                  },
                  "role": {
                    "$ref": "#/$defs/ProviderRole"
                  },
                  "domain": {
                    "type": "string",
                    "description": "Domain the provider controls, so that an agent can find it in the registry."
                  },
                  "lei": {
                    "$ref": "#/$defs/Lei",
                    "description": "Legal Entity Identifier, when the provider has one."
                  },
                  "licences": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/Licence"
                    },
                    "description": "The register entries that allow the provider to carry the risk, for example its authorisation as an insurer. At least one.",
                    "minItems": 1
                  }
                },
                "required": [
                  "name",
                  "role",
                  "licences"
                ],
                "description": "The party that carries the risk."
              },
              "ProviderRole": {
                "type": "string",
                "const": "insurer",
                "description": "Role of the party that carries the risk."
              },
              "QuoteComplete": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "const": "complete"
                  },
                  "offers": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/Offer"
                    }
                  },
                  "no_offer": {
                    "$ref": "#/$defs/NoOffer",
                    "description": "Required when `offers` is empty."
                  }
                },
                "required": [
                  "status",
                  "offers"
                ],
                "description": "A quote with its priced offers, or with the reason why there is none."
              },
              "QuoteNeedsInput": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "const": "needs_input"
                  },
                  "answers_schema": {
                    "$ref": "#/$defs/AnswersSchema",
                    "description": "The questions of the product. The agent asks the missing ones from it."
                  },
                  "missing_fields": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/FieldIssue"
                    },
                    "description": "Properties of `answers_schema` that are missing, not valid or not accepted."
                  }
                },
                "required": [
                  "status",
                  "answers_schema",
                  "missing_fields"
                ],
                "description": "The questions of the product, and the answers that are still missing or wrong."
              },
              "QuoteResult": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/QuoteComplete"
                  },
                  {
                    "$ref": "#/$defs/QuoteNeedsInput"
                  }
                ]
              },
              "RegisterIdentifierType": {
                "type": "string",
                "enum": [
                  "orias_number",
                  "siren",
                  "fca_frn",
                  "npn",
                  "naic_cocode",
                  "lei",
                  "other"
                ],
                "description": "Kind of public register identifier."
              },
              "SubdivisionCode": {
                "type": "string",
                "description": "ISO 3166-2 subdivision code, upper case, for example \"US-CA\" for California.",
                "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
              },
              "Url": {
                "type": "string",
                "format": "uri"
              },
              "WaitingPeriod": {
                "type": "object",
                "properties": {
                  "applies_to": {
                    "type": "string",
                    "description": "The cover it applies to: a label of `included`, for example \"Illness\"."
                  },
                  "days": {
                    "type": "number",
                    "description": "Days after the start date. 0 when the cover starts at once."
                  }
                },
                "required": [
                  "applies_to",
                  "days"
                ],
                "description": "The days after the start date before a claim for one cover is paid."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "destructiveHint": false,
            "idempotentHint": true
          },
          "_meta": {
            "org.agenticinsuranceprotocol/aip": {
              "level": 2
            }
          }
        },
        {
          "name": "submit_application",
          "description": "Apply for an offer of a complete quote. The server takes the answers and their sources from that quote. Returns the page where the customer checks the answers, reads the documents and approves, then signs and pays. Only the customer can approve.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "offer_id": {
                "type": "string"
              },
              "parties": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Party"
                }
              },
              "language": {
                "$ref": "#/$defs/LanguageTag",
                "description": "Language of the `summary` and of the approval page."
              }
            },
            "required": [
              "offer_id",
              "parties"
            ],
            "description": "Params of `submit_application`. The offer comes from a complete quote. The server takes the answers, their sources and the options from that quote, so the agent does not send them again. When the customer wants to change an answer, the agent calls `quote` again, and applies for an offer of the new quote.",
            "$defs": {
              "CountryCode": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2 country code, upper case.",
                "pattern": "^[A-Z]{2}$"
              },
              "DateString": {
                "type": "string",
                "description": "Calendar date, ISO 8601.",
                "format": "date"
              },
              "LanguageTag": {
                "type": "string",
                "description": "BCP 47 language tag, for example `fr` or `en-GB`.",
                "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$"
              },
              "Party": {
                "type": "object",
                "properties": {
                  "party_ref": {
                    "type": "string",
                    "description": "Local reference, unique in one application."
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "person",
                      "organisation"
                    ]
                  },
                  "roles": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/PartyRole"
                    }
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "relationship_to_subscriber": {
                    "type": "string",
                    "description": "Relationship to the subscriber, for example \"self\", \"spouse\", \"child\", \"employee\"."
                  },
                  "date_of_birth": {
                    "$ref": "#/$defs/DateString"
                  },
                  "country_of_residence": {
                    "$ref": "#/$defs/CountryCode"
                  }
                },
                "required": [
                  "party_ref",
                  "kind",
                  "roles",
                  "display_name"
                ],
                "description": "A person or organisation in the application. Data in a party MUST be limited to what the product needs. Identity numbers MUST NOT be here."
              },
              "PartyRole": {
                "type": "string",
                "enum": [
                  "subscriber",
                  "payer",
                  "insured",
                  "beneficiary"
                ],
                "description": "Role of a party in the application."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "$ref": "#/$defs/SubmitApplicationResult"
              },
              {
                "type": "object",
                "properties": {
                  "error": {
                    "$ref": "#/$defs/AipError"
                  }
                },
                "required": [
                  "error"
                ]
              }
            ],
            "$defs": {
              "AipError": {
                "type": "object",
                "properties": {
                  "code": {
                    "$ref": "#/$defs/AipErrorCode"
                  },
                  "message": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/FieldIssue"
                    }
                  },
                  "retryable": {
                    "type": "boolean",
                    "description": "True when the same call can succeed later with no change, as for `rate_limited` and `unavailable`."
                  },
                  "retry_after_seconds": {
                    "type": "number",
                    "description": "When the agent SHOULD retry, when `retryable` is true."
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "description": "Error returned in an MCP tool result with `isError: true`, in `structuredContent.error`, with the same JSON as text in `content`."
              },
              "AipErrorCode": {
                "type": "string",
                "enum": [
                  "invalid_params",
                  "rate_limited",
                  "unavailable",
                  "not_supported",
                  "not_licensed",
                  "product_not_found",
                  "answers_invalid",
                  "offer_not_found",
                  "offer_expired",
                  "application_not_found"
                ]
              },
              "ApplicationKey": {
                "type": "string",
                "description": "The key to read an application with `get_operation`. The server returns it only in the result of `submit_application`. It MUST hold at least 128 bits of randomness. It is not in the approval page, so the agent keeps it to itself.",
                "minLength": 22
              },
              "DateTimeString": {
                "type": "string",
                "description": "Date and time with offset, ISO 8601.",
                "format": "date-time"
              },
              "FieldIssue": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string"
                  },
                  "issue": {
                    "type": "string",
                    "enum": [
                      "missing",
                      "invalid",
                      "not_accepted"
                    ]
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "field",
                  "issue"
                ]
              },
              "SubmitApplicationResult": {
                "type": "object",
                "properties": {
                  "application_id": {
                    "type": "string"
                  },
                  "application_key": {
                    "$ref": "#/$defs/ApplicationKey",
                    "description": "The key to read the application with `get_operation`. See `ApplicationKey`."
                  },
                  "summary": {
                    "type": "string",
                    "description": "The application in plain words, so that the customer can decide from it alone: the product, the tier, the insurer and the price. It MUST give each answer and its source, and MUST ask the customer to approve only when each answer is true and complete, so that the approval is also the customer's confirmation of the answers."
                  },
                  "url": {
                    "$ref": "#/$defs/Url",
                    "description": "The seller's page where the customer approves the application, then signs and pays. Before the customer can approve, the page MUST show the firm price, each answer with its source, and a link to each document of the product and of the offer with `required_before_commitment: true`. It MUST let the customer approve or refuse.\n\nThe page MUST take an approval only from a form that the person submits on it, never from a GET request, so that a link preview cannot approve. The URL MUST be on the domain of the seller, MUST hold a token of at least 128 bits of randomness that is neither the `application_id` nor the `application_key`, and MUST NOT contain personal data."
                  },
                  "expires_at": {
                    "$ref": "#/$defs/DateTimeString",
                    "description": "Last moment the customer can approve. After it, the application is `expired`."
                  }
                },
                "required": [
                  "application_id",
                  "application_key",
                  "summary",
                  "url",
                  "expires_at"
                ],
                "description": "An application that waits for the customer. `submit_application` commits nothing. The customer approves the application on the seller's page at `url`, then signs and pays on the same site. When the client declares MCP URL-mode elicitation, the server SHOULD open the page with a URL-mode elicitation of `url`. Otherwise the agent gives the customer `url`.\n\nThe seller MUST keep what the customer approved, with the answers and their sources, the price and the documents, for the period that the law requires."
              },
              "Url": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "annotations": {
            "readOnlyHint": false,
            "destructiveHint": false,
            "idempotentHint": false
          },
          "_meta": {
            "org.agenticinsuranceprotocol/aip": {
              "level": 3
            }
          }
        },
        {
          "name": "get_operation",
          "description": "Read where an application of this server is: waiting for the customer, approved, refused or expired. Send the application_id and the application_key of submit_application.",
          "inputSchema": {
            "type": "object",
            "properties": {
              "application_id": {
                "type": "string"
              },
              "application_key": {
                "$ref": "#/$defs/ApplicationKey"
              }
            },
            "required": [
              "application_id",
              "application_key"
            ],
            "description": "Params of `get_operation`.",
            "$defs": {
              "ApplicationKey": {
                "type": "string",
                "description": "The key to read an application with `get_operation`. The server returns it only in the result of `submit_application`. It MUST hold at least 128 bits of randomness. It is not in the approval page, so the agent keeps it to itself.",
                "minLength": 22
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "anyOf": [
              {
                "$ref": "#/$defs/GetOperationResult"
              },
              {
                "type": "object",
                "properties": {
                  "error": {
                    "$ref": "#/$defs/AipError"
                  }
                },
                "required": [
                  "error"
                ]
              }
            ],
            "$defs": {
              "AipError": {
                "type": "object",
                "properties": {
                  "code": {
                    "$ref": "#/$defs/AipErrorCode"
                  },
                  "message": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/FieldIssue"
                    }
                  },
                  "retryable": {
                    "type": "boolean",
                    "description": "True when the same call can succeed later with no change, as for `rate_limited` and `unavailable`."
                  },
                  "retry_after_seconds": {
                    "type": "number",
                    "description": "When the agent SHOULD retry, when `retryable` is true."
                  }
                },
                "required": [
                  "code",
                  "message",
                  "retryable"
                ],
                "description": "Error returned in an MCP tool result with `isError: true`, in `structuredContent.error`, with the same JSON as text in `content`."
              },
              "AipErrorCode": {
                "type": "string",
                "enum": [
                  "invalid_params",
                  "rate_limited",
                  "unavailable",
                  "not_supported",
                  "not_licensed",
                  "product_not_found",
                  "answers_invalid",
                  "offer_not_found",
                  "offer_expired",
                  "application_not_found"
                ]
              },
              "ApplicationState": {
                "type": "string",
                "enum": [
                  "waiting",
                  "approved",
                  "refused",
                  "expired"
                ],
                "description": "Where an application is."
              },
              "FieldIssue": {
                "type": "object",
                "properties": {
                  "field": {
                    "type": "string"
                  },
                  "issue": {
                    "type": "string",
                    "enum": [
                      "missing",
                      "invalid",
                      "not_accepted"
                    ]
                  },
                  "message": {
                    "type": "string"
                  }
                },
                "required": [
                  "field",
                  "issue"
                ]
              },
              "GetOperationResult": {
                "type": "object",
                "properties": {
                  "application_id": {
                    "type": "string"
                  },
                  "state": {
                    "$ref": "#/$defs/ApplicationState"
                  }
                },
                "required": [
                  "application_id",
                  "state"
                ],
                "description": "Result of `get_operation`. When the `application_key` is not the key of the application, the server returns `application_not_found`."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "destructiveHint": false,
            "idempotentHint": true
          },
          "_meta": {
            "org.agenticinsuranceprotocol/aip": {
              "level": 3
            }
          }
        }
      ]
    },
    "org.agenticinsuranceprotocol/registry": {
      "tools": [
        {
          "name": "search_distributors",
          "description": "The sellers that speak AIP in a market, each with a licence check for that market. Send a market, never a person. The order is random, so never show it as a ranking.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "country": {
                "type": "string",
                "pattern": "^[A-Z]{2}$",
                "description": "Country where the customer buys."
              },
              "subdivision": {
                "description": "Subdivision where the customer buys, for example a US state.",
                "type": "string",
                "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
              },
              "line": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_]*$",
                "description": "Product line, for example \"pet\" or \"home\"."
              },
              "insured_family": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_]*$",
                "description": "Family of what a product insures, for example \"pet\" or \"dwelling\"."
              },
              "min_conformance_level": {
                "description": "Return only servers of this level or above.",
                "type": "number",
                "enum": [
                  1,
                  2,
                  3
                ]
              },
              "cursor": {
                "type": "string"
              }
            },
            "required": [
              "country"
            ],
            "additionalProperties": false,
            "description": "Params of `search_distributors`. They describe a market, never a person."
          },
          "outputSchema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "distributors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "legal_name": {
                      "type": "string"
                    },
                    "trading_name": {
                      "type": "string"
                    },
                    "lei": {
                      "type": "string",
                      "pattern": "^[A-Z0-9]{18}[0-9]{2}$",
                      "description": "Legal Entity Identifier (ISO 17442)."
                    },
                    "domain": {
                      "type": "string",
                      "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$",
                      "description": "Host name, lower case, with no scheme, port or path, for example \"pets.example.com\"."
                    },
                    "mcp_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "MCP endpoint of the server."
                    },
                    "roles": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "string",
                            "const": "insurer",
                            "description": "Role of the party that carries the risk."
                          },
                          {
                            "type": "string",
                            "const": "broker"
                          },
                          {
                            "type": "string",
                            "const": "agent"
                          },
                          {
                            "type": "string",
                            "const": "mga"
                          },
                          {
                            "type": "string",
                            "const": "comparator"
                          }
                        ],
                        "description": "Role of a party in the distribution chain."
                      }
                    },
                    "conformance_level": {
                      "type": "number",
                      "enum": [
                        1,
                        2,
                        3
                      ],
                      "description": "Conformance level of a server: 1 Inform, 2 Quote, 3 Subscribe."
                    },
                    "lines": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_]*$",
                        "description": "Product line, for example \"pet\" or \"home\"."
                      }
                    },
                    "countries": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$",
                        "description": "ISO 3166-1 alpha-2 country code, upper case."
                      }
                    },
                    "subdivisions": {
                      "description": "Subdivisions where the server holds a licence. Omit when its licence covers the whole country.",
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
                        "description": "ISO 3166-2 subdivision code, upper case, for example \"US-CA\" for California."
                      }
                    },
                    "insured_families": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_]*$",
                        "description": "Family of what a product insures, for example \"pet\" or \"dwelling\"."
                      }
                    },
                    "complaints_url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "licence_check": {
                      "type": "object",
                      "properties": {
                        "check_id": {
                          "type": "string"
                        },
                        "params": {
                          "type": "object",
                          "properties": {
                            "capacity": {
                              "type": "string",
                              "enum": [
                                "distributor",
                                "provider"
                              ],
                              "description": "\"distributor\" for a seller, \"provider\" for the party that carries the risk, for example the insurer in `Offer.provider`."
                            },
                            "subject": {
                              "type": "object",
                              "properties": {
                                "domain": {
                                  "description": "Domain of the MCP server or the website that receives the customer's answers. REQUIRED for a seller.",
                                  "type": "string",
                                  "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"
                                },
                                "identifier": {
                                  "description": "Register entry that the party shows, for example in the legal notice of its website.",
                                  "type": "object",
                                  "properties": {
                                    "country": {
                                      "type": "string",
                                      "pattern": "^[A-Z]{2}$",
                                      "description": "Country of the register."
                                    },
                                    "identifier_type": {
                                      "type": "string",
                                      "enum": [
                                        "orias_number",
                                        "siren",
                                        "fca_frn",
                                        "npn",
                                        "naic_cocode",
                                        "lei",
                                        "other"
                                      ],
                                      "description": "Kind of public register identifier."
                                    },
                                    "identifier": {
                                      "type": "string"
                                    },
                                    "register": {
                                      "description": "Name of the register. Give it when `identifier_type` is \"other\".",
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "country",
                                    "identifier_type",
                                    "identifier"
                                  ],
                                  "additionalProperties": false
                                },
                                "legal_name": {
                                  "description": "Legal name that the party shows.",
                                  "type": "string"
                                }
                              },
                              "additionalProperties": false
                            },
                            "country": {
                              "type": "string",
                              "pattern": "^[A-Z]{2}$",
                              "description": "Country where the customer buys."
                            },
                            "subdivision": {
                              "description": "Subdivision where the customer buys. REQUIRED in the United States.",
                              "type": "string",
                              "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
                            },
                            "line": {
                              "type": "string",
                              "pattern": "^[a-z][a-z0-9_]*$",
                              "description": "Product line, for example \"pet\" or \"home\"."
                            }
                          },
                          "required": [
                            "capacity",
                            "subject",
                            "country"
                          ],
                          "additionalProperties": false,
                          "description": "The params of the call, so that the result is a complete record alone."
                        },
                        "subject": {
                          "type": "object",
                          "properties": {
                            "legal_name": {
                              "type": "string"
                            },
                            "lei": {
                              "type": "string",
                              "pattern": "^[A-Z0-9]{18}[0-9]{2}$",
                              "description": "Legal Entity Identifier (ISO 17442)."
                            },
                            "domain": {
                              "type": "string",
                              "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$",
                              "description": "Host name, lower case, with no scheme, port or path, for example \"pets.example.com\"."
                            },
                            "domain_link": {
                              "type": "string",
                              "enum": [
                                "register",
                                "confirmed",
                                "claimed",
                                "not_linked"
                              ],
                              "description": "How the registry tied the domain to the entries. Only \"register\" and \"confirmed\" support \"licensed\"."
                            },
                            "listed": {
                              "type": "boolean",
                              "description": "True when the registry lists the MCP server of the domain."
                            },
                            "mcp_url": {
                              "description": "MCP endpoint of the listed server.",
                              "type": "string",
                              "format": "uri"
                            }
                          },
                          "required": [
                            "listed"
                          ],
                          "additionalProperties": false
                        },
                        "licences": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "country": {
                                "type": "string",
                                "pattern": "^[A-Z]{2}$",
                                "description": "ISO 3166-1 alpha-2 country code, upper case."
                              },
                              "regulator": {
                                "type": "string"
                              },
                              "register": {
                                "type": "string"
                              },
                              "identifier_type": {
                                "type": "string",
                                "enum": [
                                  "orias_number",
                                  "siren",
                                  "fca_frn",
                                  "npn",
                                  "naic_cocode",
                                  "lei",
                                  "other"
                                ],
                                "description": "Kind of public register identifier."
                              },
                              "identifier": {
                                "type": "string"
                              },
                              "role": {
                                "description": "Role that the entry gives. Omit when the status is \"not_found\".",
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "const": "insurer",
                                    "description": "Role of the party that carries the risk."
                                  },
                                  {
                                    "type": "string",
                                    "const": "broker"
                                  },
                                  {
                                    "type": "string",
                                    "const": "agent"
                                  },
                                  {
                                    "type": "string",
                                    "const": "mga"
                                  },
                                  {
                                    "type": "string",
                                    "const": "comparator"
                                  }
                                ]
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "active",
                                  "pending",
                                  "lapsed",
                                  "suspended",
                                  "revoked",
                                  "not_found",
                                  "name_mismatch"
                                ],
                                "description": "Status of one register entry, as the registry reads it."
                              },
                              "register_status": {
                                "description": "The status in the words of the register, for example \"Inscrit\".",
                                "type": "string"
                              },
                              "categories": {
                                "description": "Register categories, for example ORIAS \"COA\".",
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "lines": {
                                "description": "Lines that the categories cover. Omit when they cover every line.",
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^[a-z][a-z0-9_]*$",
                                  "description": "Product line, for example \"pet\" or \"home\"."
                                }
                              },
                              "subdivisions": {
                                "description": "Subdivisions where the entry applies. Omit when it covers the whole country.",
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
                                  "description": "ISO 3166-2 subdivision code, upper case, for example \"US-CA\" for California."
                                }
                              },
                              "passports": {
                                "description": "Other countries where the entry may operate (EU and EEA).",
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^[A-Z]{2}$",
                                  "description": "ISO 3166-1 alpha-2 country code, upper case."
                                }
                              },
                              "name_in_register": {
                                "type": "string"
                              },
                              "valid_until": {
                                "type": "string",
                                "format": "date",
                                "description": "Calendar date, ISO 8601."
                              },
                              "access": {
                                "type": "string",
                                "enum": [
                                  "api",
                                  "bulk_file",
                                  "web_page"
                                ],
                                "description": "How the registry reads a public register."
                              },
                              "source_date": {
                                "description": "Date of the data in the source, when it is older than the read.",
                                "type": "string",
                                "format": "date"
                              },
                              "checked_at": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the registry read this entry."
                              },
                              "source_url": {
                                "type": "string",
                                "format": "uri",
                                "description": "Public page where anyone can check the entry."
                              }
                            },
                            "required": [
                              "country",
                              "regulator",
                              "register",
                              "identifier_type",
                              "identifier",
                              "status",
                              "access",
                              "checked_at",
                              "source_url"
                            ],
                            "additionalProperties": false,
                            "description": "The result of reading one entry in one public register."
                          },
                          "description": "Every entry the registry read for the party."
                        },
                        "outcome": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "verdict": {
                                  "type": "string",
                                  "const": "licensed"
                                },
                                "message": {
                                  "type": "string",
                                  "description": "Plain-language explanation that the AI agent can pass to the customer."
                                }
                              },
                              "required": [
                                "verdict",
                                "message"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "verdict": {
                                  "type": "string",
                                  "const": "not_licensed"
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "no_entry",
                                    "licence_not_active",
                                    "name_mismatch",
                                    "role_not_covered",
                                    "subdivision_not_covered",
                                    "line_not_covered"
                                  ]
                                },
                                "message": {
                                  "type": "string",
                                  "description": "Plain-language explanation that the AI agent can pass to the customer."
                                }
                              },
                              "required": [
                                "verdict",
                                "reason",
                                "message"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "verdict": {
                                  "type": "string",
                                  "const": "unknown"
                                },
                                "reason": {
                                  "type": "string",
                                  "enum": [
                                    "country_not_covered",
                                    "subdivision_required",
                                    "register_unavailable",
                                    "subject_not_identified",
                                    "domain_not_linked"
                                  ]
                                },
                                "message": {
                                  "type": "string",
                                  "description": "Plain-language explanation that the AI agent can pass to the customer."
                                }
                              },
                              "required": [
                                "verdict",
                                "reason",
                                "message"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        },
                        "checked_at": {
                          "type": "string",
                          "format": "date-time",
                          "description": "Date and time with offset, ISO 8601."
                        }
                      },
                      "required": [
                        "check_id",
                        "params",
                        "subject",
                        "licences",
                        "outcome",
                        "checked_at"
                      ],
                      "additionalProperties": false,
                      "description": "The licence check of the server for the market of the search. Its verdict is \"licensed\"."
                    },
                    "listed_since": {
                      "type": "string",
                      "format": "date",
                      "description": "Calendar date, ISO 8601."
                    }
                  },
                  "required": [
                    "legal_name",
                    "domain",
                    "mcp_url",
                    "roles",
                    "conformance_level",
                    "lines",
                    "countries",
                    "licence_check",
                    "listed_since"
                  ],
                  "additionalProperties": false,
                  "description": "A server that the registry lists."
                }
              },
              "next_cursor": {
                "type": "string"
              }
            },
            "required": [
              "distributors"
            ],
            "additionalProperties": false,
            "description": "Result of `search_distributors`. The order carries no meaning: never show it as a ranking."
          },
          "annotations": {
            "readOnlyHint": true,
            "destructiveHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "verify_licence",
          "description": "Check in the public registers that a seller, or the insurer behind an offer, holds an active licence for a market. Send a company and a market, never a person.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "capacity": {
                "type": "string",
                "enum": [
                  "distributor",
                  "provider"
                ],
                "description": "\"distributor\" for a seller, \"provider\" for the party that carries the risk, for example the insurer in `Offer.provider`."
              },
              "subject": {
                "type": "object",
                "properties": {
                  "domain": {
                    "description": "Domain of the MCP server or the website that receives the customer's answers. REQUIRED for a seller.",
                    "type": "string",
                    "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"
                  },
                  "identifier": {
                    "description": "Register entry that the party shows, for example in the legal notice of its website.",
                    "type": "object",
                    "properties": {
                      "country": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$",
                        "description": "Country of the register."
                      },
                      "identifier_type": {
                        "type": "string",
                        "enum": [
                          "orias_number",
                          "siren",
                          "fca_frn",
                          "npn",
                          "naic_cocode",
                          "lei",
                          "other"
                        ],
                        "description": "Kind of public register identifier."
                      },
                      "identifier": {
                        "type": "string"
                      },
                      "register": {
                        "description": "Name of the register. Give it when `identifier_type` is \"other\".",
                        "type": "string"
                      }
                    },
                    "required": [
                      "country",
                      "identifier_type",
                      "identifier"
                    ],
                    "additionalProperties": false
                  },
                  "legal_name": {
                    "description": "Legal name that the party shows.",
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "country": {
                "type": "string",
                "pattern": "^[A-Z]{2}$",
                "description": "Country where the customer buys."
              },
              "subdivision": {
                "description": "Subdivision where the customer buys. REQUIRED in the United States.",
                "type": "string",
                "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
              },
              "line": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_]*$",
                "description": "Product line, for example \"pet\" or \"home\"."
              }
            },
            "required": [
              "capacity",
              "subject",
              "country"
            ],
            "additionalProperties": false,
            "description": "Params of `verify_licence`. They name a company and a market, never a person."
          },
          "outputSchema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "check_id": {
                "type": "string"
              },
              "params": {
                "type": "object",
                "properties": {
                  "capacity": {
                    "type": "string",
                    "enum": [
                      "distributor",
                      "provider"
                    ],
                    "description": "\"distributor\" for a seller, \"provider\" for the party that carries the risk, for example the insurer in `Offer.provider`."
                  },
                  "subject": {
                    "type": "object",
                    "properties": {
                      "domain": {
                        "description": "Domain of the MCP server or the website that receives the customer's answers. REQUIRED for a seller.",
                        "type": "string",
                        "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"
                      },
                      "identifier": {
                        "description": "Register entry that the party shows, for example in the legal notice of its website.",
                        "type": "object",
                        "properties": {
                          "country": {
                            "type": "string",
                            "pattern": "^[A-Z]{2}$",
                            "description": "Country of the register."
                          },
                          "identifier_type": {
                            "type": "string",
                            "enum": [
                              "orias_number",
                              "siren",
                              "fca_frn",
                              "npn",
                              "naic_cocode",
                              "lei",
                              "other"
                            ],
                            "description": "Kind of public register identifier."
                          },
                          "identifier": {
                            "type": "string"
                          },
                          "register": {
                            "description": "Name of the register. Give it when `identifier_type` is \"other\".",
                            "type": "string"
                          }
                        },
                        "required": [
                          "country",
                          "identifier_type",
                          "identifier"
                        ],
                        "additionalProperties": false
                      },
                      "legal_name": {
                        "description": "Legal name that the party shows.",
                        "type": "string"
                      }
                    },
                    "additionalProperties": false
                  },
                  "country": {
                    "type": "string",
                    "pattern": "^[A-Z]{2}$",
                    "description": "Country where the customer buys."
                  },
                  "subdivision": {
                    "description": "Subdivision where the customer buys. REQUIRED in the United States.",
                    "type": "string",
                    "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
                  },
                  "line": {
                    "type": "string",
                    "pattern": "^[a-z][a-z0-9_]*$",
                    "description": "Product line, for example \"pet\" or \"home\"."
                  }
                },
                "required": [
                  "capacity",
                  "subject",
                  "country"
                ],
                "additionalProperties": false,
                "description": "The params of the call, so that the result is a complete record alone."
              },
              "subject": {
                "type": "object",
                "properties": {
                  "legal_name": {
                    "type": "string"
                  },
                  "lei": {
                    "type": "string",
                    "pattern": "^[A-Z0-9]{18}[0-9]{2}$",
                    "description": "Legal Entity Identifier (ISO 17442)."
                  },
                  "domain": {
                    "type": "string",
                    "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$",
                    "description": "Host name, lower case, with no scheme, port or path, for example \"pets.example.com\"."
                  },
                  "domain_link": {
                    "type": "string",
                    "enum": [
                      "register",
                      "confirmed",
                      "claimed",
                      "not_linked"
                    ],
                    "description": "How the registry tied the domain to the entries. Only \"register\" and \"confirmed\" support \"licensed\"."
                  },
                  "listed": {
                    "type": "boolean",
                    "description": "True when the registry lists the MCP server of the domain."
                  },
                  "mcp_url": {
                    "description": "MCP endpoint of the listed server.",
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "listed"
                ],
                "additionalProperties": false
              },
              "licences": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "country": {
                      "type": "string",
                      "pattern": "^[A-Z]{2}$",
                      "description": "ISO 3166-1 alpha-2 country code, upper case."
                    },
                    "regulator": {
                      "type": "string"
                    },
                    "register": {
                      "type": "string"
                    },
                    "identifier_type": {
                      "type": "string",
                      "enum": [
                        "orias_number",
                        "siren",
                        "fca_frn",
                        "npn",
                        "naic_cocode",
                        "lei",
                        "other"
                      ],
                      "description": "Kind of public register identifier."
                    },
                    "identifier": {
                      "type": "string"
                    },
                    "role": {
                      "description": "Role that the entry gives. Omit when the status is \"not_found\".",
                      "anyOf": [
                        {
                          "type": "string",
                          "const": "insurer",
                          "description": "Role of the party that carries the risk."
                        },
                        {
                          "type": "string",
                          "const": "broker"
                        },
                        {
                          "type": "string",
                          "const": "agent"
                        },
                        {
                          "type": "string",
                          "const": "mga"
                        },
                        {
                          "type": "string",
                          "const": "comparator"
                        }
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "pending",
                        "lapsed",
                        "suspended",
                        "revoked",
                        "not_found",
                        "name_mismatch"
                      ],
                      "description": "Status of one register entry, as the registry reads it."
                    },
                    "register_status": {
                      "description": "The status in the words of the register, for example \"Inscrit\".",
                      "type": "string"
                    },
                    "categories": {
                      "description": "Register categories, for example ORIAS \"COA\".",
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "lines": {
                      "description": "Lines that the categories cover. Omit when they cover every line.",
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[a-z][a-z0-9_]*$",
                        "description": "Product line, for example \"pet\" or \"home\"."
                      }
                    },
                    "subdivisions": {
                      "description": "Subdivisions where the entry applies. Omit when it covers the whole country.",
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
                        "description": "ISO 3166-2 subdivision code, upper case, for example \"US-CA\" for California."
                      }
                    },
                    "passports": {
                      "description": "Other countries where the entry may operate (EU and EEA).",
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^[A-Z]{2}$",
                        "description": "ISO 3166-1 alpha-2 country code, upper case."
                      }
                    },
                    "name_in_register": {
                      "type": "string"
                    },
                    "valid_until": {
                      "type": "string",
                      "format": "date",
                      "description": "Calendar date, ISO 8601."
                    },
                    "access": {
                      "type": "string",
                      "enum": [
                        "api",
                        "bulk_file",
                        "web_page"
                      ],
                      "description": "How the registry reads a public register."
                    },
                    "source_date": {
                      "description": "Date of the data in the source, when it is older than the read.",
                      "type": "string",
                      "format": "date"
                    },
                    "checked_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the registry read this entry."
                    },
                    "source_url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Public page where anyone can check the entry."
                    }
                  },
                  "required": [
                    "country",
                    "regulator",
                    "register",
                    "identifier_type",
                    "identifier",
                    "status",
                    "access",
                    "checked_at",
                    "source_url"
                  ],
                  "additionalProperties": false,
                  "description": "The result of reading one entry in one public register."
                },
                "description": "Every entry the registry read for the party."
              },
              "outcome": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "verdict": {
                        "type": "string",
                        "const": "licensed"
                      },
                      "message": {
                        "type": "string",
                        "description": "Plain-language explanation that the AI agent can pass to the customer."
                      }
                    },
                    "required": [
                      "verdict",
                      "message"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "verdict": {
                        "type": "string",
                        "const": "not_licensed"
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "no_entry",
                          "licence_not_active",
                          "name_mismatch",
                          "role_not_covered",
                          "subdivision_not_covered",
                          "line_not_covered"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "description": "Plain-language explanation that the AI agent can pass to the customer."
                      }
                    },
                    "required": [
                      "verdict",
                      "reason",
                      "message"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "verdict": {
                        "type": "string",
                        "const": "unknown"
                      },
                      "reason": {
                        "type": "string",
                        "enum": [
                          "country_not_covered",
                          "subdivision_required",
                          "register_unavailable",
                          "subject_not_identified",
                          "domain_not_linked"
                        ]
                      },
                      "message": {
                        "type": "string",
                        "description": "Plain-language explanation that the AI agent can pass to the customer."
                      }
                    },
                    "required": [
                      "verdict",
                      "reason",
                      "message"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "checked_at": {
                "type": "string",
                "format": "date-time",
                "description": "Date and time with offset, ISO 8601."
              }
            },
            "required": [
              "check_id",
              "params",
              "subject",
              "licences",
              "outcome",
              "checked_at"
            ],
            "additionalProperties": false,
            "description": "Result of `verify_licence`. Keep it with the record of the sale."
          },
          "annotations": {
            "readOnlyHint": true,
            "destructiveHint": false,
            "idempotentHint": true
          }
        },
        {
          "name": "get_country_rules",
          "description": "The rules that an AI agent follows in a country, and in a state or a line when a file exists. Follow every file of the result.",
          "inputSchema": {
            "type": "object",
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "properties": {
              "country": {
                "type": "string",
                "pattern": "^[A-Z]{2}$",
                "description": "ISO 3166-1 alpha-2 country code, upper case."
              },
              "subdivision": {
                "description": "Adds the file of this subdivision, when one exists.",
                "type": "string",
                "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$"
              },
              "line": {
                "description": "Adds the file of this line, when one exists.",
                "type": "string",
                "pattern": "^[a-z][a-z0-9_]*$"
              }
            },
            "required": [
              "country"
            ],
            "additionalProperties": false,
            "description": "Params of `get_country_rules`."
          },
          "outputSchema": {
            "$schema": "https://json-schema.org/draft/2020-12/schema",
            "type": "object",
            "properties": {
              "files": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "country": {
                      "type": "string",
                      "pattern": "^[A-Z]{2}$",
                      "description": "ISO 3166-1 alpha-2 country code, upper case."
                    },
                    "subdivision": {
                      "type": "string",
                      "pattern": "^[A-Z]{2}-[A-Z0-9]{1,3}$",
                      "description": "ISO 3166-2 subdivision code, upper case, for example \"US-CA\" for California."
                    },
                    "line": {
                      "type": "string",
                      "pattern": "^[a-z][a-z0-9_]*$",
                      "description": "Product line, for example \"pet\" or \"home\"."
                    },
                    "version": {
                      "type": "string"
                    },
                    "owner": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "draft",
                        "endorsed"
                      ]
                    },
                    "endorsed_by": {
                      "type": "string"
                    },
                    "reviewed_at": {
                      "type": "string",
                      "format": "date",
                      "description": "Calendar date, ISO 8601."
                    },
                    "effective_from": {
                      "type": "string",
                      "format": "date",
                      "description": "Calendar date, ISO 8601."
                    },
                    "language": {
                      "type": "string",
                      "pattern": "^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$",
                      "description": "BCP 47 language tag, for example `fr` or `en-GB`."
                    },
                    "content": {
                      "type": "string",
                      "description": "The whole file, unchanged, front matter included."
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Public HTTPS address of the same file."
                    },
                    "skill_uri": {
                      "description": "URI of the same file in the AIP skill.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "country",
                    "version",
                    "owner",
                    "status",
                    "effective_from",
                    "language",
                    "content",
                    "url"
                  ],
                  "additionalProperties": false,
                  "description": "One rules file of the AIP skill: Markdown with a YAML front matter that gives the same values as these fields."
                }
              }
            },
            "required": [
              "files"
            ],
            "additionalProperties": false,
            "description": "Result of `get_country_rules`: the file of the country first. Follow every file."
          },
          "annotations": {
            "readOnlyHint": true,
            "destructiveHint": false,
            "idempotentHint": true
          }
        }
      ]
    }
  }
}
