{
  "version": "2026-03-20",
  "format": "openai-responses-api-function-tools",
  "source": "https://loanie.co.nz/.well-known/mcp.json",
  "docs": {
    "openaiGuide": "https://developers.openai.com/api/docs/guides/function-calling",
    "skills": "https://loanie.co.nz/skills.md",
    "llms": "https://loanie.co.nz/llms.txt",
    "full": "https://loanie.co.nz/llms-full.txt"
  },
  "defaults": {
    "tool_choice": "auto",
    "parallel_tool_calls": false
  },
  "notes": [
    "The tools array below can be passed directly to client.responses.create({ tools }).",
    "All definitions use strict mode. Optional values are represented as nullable required fields to remain compatible with strict JSON schema enforcement.",
    "Confirm explicit user intent before calling submit_loan_application.",
    "If you use the MCP server instead, parse content[0].text as JSON."
  ],
  "sideEffectingTools": [
    "submit_loan_application"
  ],
  "tools": [
    {
      "type": "function",
      "name": "get_mortgage_rates",
      "description": "Get current mortgage interest rates from major New Zealand banks. Returns rates for various fixed terms.",
      "parameters": {
        "type": "object",
        "properties": {},
        "required": [],
        "additionalProperties": false
      },
      "strict": true
    },
    {
      "type": "function",
      "name": "search_addresses",
      "description": "Search for New Zealand property addresses by free-text query. Use the returned propertyId with get_property_details for full property information.",
      "parameters": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "Address search query, e.g. \"123 Queen Street Auckland\""
          }
        },
        "required": [
          "query"
        ],
        "additionalProperties": false
      },
      "strict": true
    },
    {
      "type": "function",
      "name": "get_property_details",
      "description": "Get detailed information about a New Zealand property. Provide a propertyId from search_addresses, or a full address to auto-resolve. At least one of propertyId or address should be provided.",
      "parameters": {
        "type": "object",
        "properties": {
          "propertyId": {
            "type": [
              "string",
              "null"
            ],
            "description": "Property ID from search_addresses results. Set to null when you are using address instead."
          },
          "address": {
            "type": [
              "string",
              "null"
            ],
            "description": "Full address to auto-resolve if propertyId is unavailable. Set to null when propertyId is already known."
          }
        },
        "required": [
          "propertyId",
          "address"
        ],
        "additionalProperties": false
      },
      "strict": true
    },
    {
      "type": "function",
      "name": "submit_loan_application",
      "description": "Submit a real mortgage or loan application to Loanie. An expert advisor will review and follow up via email or phone. Confirm explicit user intent before calling.",
      "parameters": {
        "type": "object",
        "properties": {
          "loanType": {
            "type": "string",
            "description": "Type of loan being applied for",
            "enum": [
              "HOME_PURCHASE",
              "REFINANCE",
              "INVESTMENT",
              "BUILD_DEVELOPMENT",
              "AUTO_LOAN",
              "HOME_EQUITY",
              "PERSONAL_LOAN",
              "BUSINESS_LOAN"
            ]
          },
          "fullName": {
            "type": "string",
            "description": "Applicant's full name"
          },
          "email": {
            "type": "string",
            "description": "Applicant's email address",
            "format": "email"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Applicant's phone number in NZ format when available"
          },
          "propertyAddress": {
            "type": [
              "string",
              "null"
            ],
            "description": "Property address for purchase or refinance applications"
          },
          "propertyValue": {
            "type": [
              "number",
              "null"
            ],
            "description": "Estimated property value in NZD"
          },
          "downPayment": {
            "type": [
              "number",
              "null"
            ],
            "description": "Deposit or down payment amount in NZD"
          },
          "referralCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Referral or invitation code if the applicant was referred"
          }
        },
        "required": [
          "loanType",
          "fullName",
          "email",
          "phone",
          "propertyAddress",
          "propertyValue",
          "downPayment",
          "referralCode"
        ],
        "additionalProperties": false
      },
      "strict": true
    },
    {
      "type": "function",
      "name": "estimate_break_fee",
      "description": "Calculate the estimated break fee for exiting a fixed-rate mortgage in New Zealand before the term ends.",
      "parameters": {
        "type": "object",
        "properties": {
          "bank": {
            "type": "string",
            "description": "Bank holding the mortgage",
            "enum": [
              "ANZ",
              "ASB",
              "BNZ",
              "Kiwibank",
              "TSB",
              "Westpac",
              "Co-operative Bank",
              "SBS",
              "HSBC"
            ]
          },
          "loanAmount": {
            "type": "number",
            "description": "Outstanding loan balance in NZD"
          },
          "fixedRate": {
            "type": "number",
            "description": "Current fixed interest rate as a percentage, e.g. 5.99"
          },
          "originalTermMonths": {
            "type": "integer",
            "description": "Original fixed term in months, e.g. 12 for 1 year"
          },
          "fixedInstallment": {
            "type": "number",
            "description": "Monthly payment amount in NZD"
          },
          "dateFixedTermBegan": {
            "type": "string",
            "description": "Date the fixed term began in YYYY-MM-DD format"
          }
        },
        "required": [
          "bank",
          "loanAmount",
          "fixedRate",
          "originalTermMonths",
          "fixedInstallment",
          "dateFixedTermBegan"
        ],
        "additionalProperties": false
      },
      "strict": true
    },
    {
      "type": "function",
      "name": "get_invitation_info",
      "description": "Look up a Loanie referral or invitation code to see who sent it, what type it is, and whether property or expert details are attached.",
      "parameters": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The invitation or referral code to look up"
          }
        },
        "required": [
          "code"
        ],
        "additionalProperties": false
      },
      "strict": true
    },
    {
      "type": "function",
      "name": "calculate_repayment",
      "description": "Calculate monthly, fortnightly, and weekly mortgage repayment amounts for a given principal, annual rate, and term.",
      "parameters": {
        "type": "object",
        "properties": {
          "principal": {
            "type": "number",
            "description": "Loan amount in NZD"
          },
          "annualRate": {
            "type": "number",
            "description": "Annual interest rate as a percentage"
          },
          "termYears": {
            "type": "integer",
            "description": "Loan term in years"
          }
        },
        "required": [
          "principal",
          "annualRate",
          "termYears"
        ],
        "additionalProperties": false
      },
      "strict": true
    },
    {
      "type": "function",
      "name": "calculate_borrowing_capacity",
      "description": "Estimate how much a person can borrow for a New Zealand home loan based on income, expenses, dependants, and deposit. Uses a stress-test rate based on current major-bank pricing.",
      "parameters": {
        "type": "object",
        "properties": {
          "annualIncome": {
            "type": "number",
            "description": "Total annual income before tax in NZD"
          },
          "otherAnnualIncome": {
            "type": [
              "number",
              "null"
            ],
            "description": "Other annual income from rent, benefits, or investments in NZD. Use null to accept the default of 0."
          },
          "dependants": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of dependant children under 18. Use null to accept the default of 0."
          },
          "monthlyExpenses": {
            "type": "number",
            "description": "Total monthly living expenses in NZD"
          },
          "monthlyExistingLoans": {
            "type": [
              "number",
              "null"
            ],
            "description": "Monthly existing loan repayments in NZD. Use null to accept the default of 0."
          },
          "deposit": {
            "type": "number",
            "description": "Total deposit or savings available in NZD"
          },
          "termYears": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Loan term in years. Use null to accept the default of 30."
          },
          "referralCode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Referral or invitation code if the borrower was referred"
          }
        },
        "required": [
          "annualIncome",
          "otherAnnualIncome",
          "dependants",
          "monthlyExpenses",
          "monthlyExistingLoans",
          "deposit",
          "termYears",
          "referralCode"
        ],
        "additionalProperties": false
      },
      "strict": true
    }
  ]
}
