{
  "descriptorVersion": "1.0.0",
  "name": "estimate_home_buying_costs",
  "title": "Home purchase cost calculator",
  "description": "Estimate Hong Kong home purchase costs on this page with the page's own calculation: down payment, ad valorem stamp duty (rules from 26 February 2026), commission, upfront total, monthly mortgage payment and a reference income at a 50% debt-servicing ratio. Replaces every input on the page and shows the same result on screen. Not mortgage, tax or legal advice. Calculation or source matching runs in this page; arguments and results are not uploaded to Agoodeal servers or to Google Analytics, and the result is returned only to the calling agent. Non-sensitive usage metadata (tool name, outcome, execution mode, error code, duration; predefined source IDs for source matching) is reported through the site’s existing Google Analytics 4.",
  "execution": {
    "environment": "browser",
    "interface": "WebMCP imperative API: document.modelContext.registerTool (experimental)",
    "executionMode": "local_calculation",
    "pageUrls": [
      "https://www.agoodeal.com/tools/home-buying-cost-calculator/"
    ],
    "requirement": "Open one of pageUrls in a browser that exposes document.modelContext. As of October 2026 this is experimental: Chrome 149+ with chrome://flags/#enable-webmcp-testing, or an origin trial that Agoodeal has not joined. Without it the page works normally for people and no tool is registered.",
    "serverEndpoint": null,
    "argumentsEncoding": "JSON object (some browser versions require callers to pass it as a JSON string).",
    "returns": "A JSON string matching outputSchema."
  },
  "annotations": {
    "readOnlyHint": false,
    "untrustedContentHint": false,
    "consequentialHint": false
  },
  "annotationNotes": "readOnlyHint is false because the tool replaces every input on the page and shows the same result the visitor would see. It submits, stores and books nothing.",
  "inputSchema": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "price",
      "loanToValuePercent",
      "annualRatePercent",
      "years"
    ],
    "properties": {
      "price": {
        "type": "number",
        "exclusiveMinimum": 0,
        "description": "Property price, HK$."
      },
      "loanToValuePercent": {
        "type": "number",
        "minimum": 0,
        "maximum": 100,
        "description": "Mortgage loan-to-value ratio, percent (0–100)."
      },
      "annualRatePercent": {
        "type": "number",
        "minimum": 0,
        "maximum": 20,
        "description": "Mortgage interest rate per year, percent (0–20)."
      },
      "years": {
        "type": "integer",
        "minimum": 1,
        "maximum": 40,
        "description": "Repayment term in whole years (1–40)."
      },
      "agentCommissionPercent": {
        "type": "number",
        "minimum": 0,
        "maximum": 10,
        "description": "Estate agent commission, percent of price (0–10). Omit for 0."
      },
      "legalFee": {
        "type": "number",
        "minimum": 0,
        "description": "Legal fees, HK$. Omit for 0."
      },
      "otherCost": {
        "type": "number",
        "minimum": 0,
        "description": "Other one-off costs to reserve, HK$. Omit for 0."
      }
    }
  },
  "outputSchema": {
    "oneOf": [
      {
        "type": "object",
        "required": [
          "ok",
          "tool",
          "mode",
          "arguments",
          "result",
          "rendered",
          "uiInputsReplaced"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "tool": {
            "type": "string"
          },
          "mode": {
            "const": "local_calculation"
          },
          "arguments": {
            "type": "object"
          },
          "result": {
            "type": "object"
          },
          "rendered": {
            "type": "object",
            "description": "Text the page displayed after the same calculation, keyed by element id."
          },
          "uiInputsReplaced": {
            "const": true
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "const": false
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "enum": [
                  "invalid_json",
                  "invalid_argument",
                  "missing_argument",
                  "unknown_argument",
                  "out_of_range",
                  "internal_error"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              }
            }
          }
        }
      }
    ]
  },
  "privacy": "Uses only the arguments supplied: every relevant page input is replaced (omitted optional arguments clear their field), so earlier visitor input is never read into the result. Nothing is stored. Calculation or source matching runs in this page; arguments and results are not uploaded to Agoodeal servers or to Google Analytics, and the result is returned only to the calling agent. Non-sensitive usage metadata (tool name, outcome, execution mode, error code, duration; predefined source IDs for source matching) is reported through the site’s existing Google Analytics 4.",
  "coverage": "Ad valorem stamp duty rules from 26 February 2026, down payment, commission, mortgage repayment.",
  "limits": [
    "Not mortgage, tax or legal advice; bank approval and rates are decided by banks."
  ],
  "officialSources": [
    {
      "id": "ird-avd-rates",
      "name": "稅務局：從價印花稅稅率",
      "publisher": "Inland Revenue Department",
      "kind": "web_page",
      "url": "https://www.ird.gov.hk/chi/faq/avd.htm"
    },
    {
      "id": "govhk-stamp-duty-computation",
      "name": "GovHK：印花稅計算服務",
      "publisher": "GovHK",
      "kind": "web_service",
      "url": "https://www.gov.hk/tc/residents/taxes/etax/services/stamp_duty_computation.htm"
    }
  ],
  "agoodealPage": "https://www.agoodeal.com/tools/home-buying-cost-calculator/"
}
