{
  "descriptorVersion": "1.0.0",
  "name": "find_cross_harbour_traffic_sources",
  "title": "Cross-harbour traffic sources",
  "description": "Source discovery for Hong Kong cross-harbour tunnel journey times and time-varying tolls: returns the official Hong Kong government data sources (API, feed, file, PDF list or official service), their format, update notes, how to use them, limits and the matching Agoodeal page. Does not fetch or return live records, and is not a booking, diagnosis or eligibility service. No government data is fetched when it is called. 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": "source_discovery",
    "pageUrls": [
      "https://www.agoodeal.com/tools/cross-harbour-traffic/"
    ],
    "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": true,
    "untrustedContentHint": false,
    "consequentialHint": false
  },
  "annotationNotes": "readOnlyHint is true: the tool only returns stored official source information and does not change the page.",
  "inputSchema": {
    "type": "object",
    "additionalProperties": false,
    "properties": {
      "topic": {
        "type": "string",
        "enum": [
          "all",
          "journey_time",
          "tolls"
        ],
        "description": "Which official source to return. Omit for all. journey_time: Tunnel journey times; tolls: Time-varying tolls."
      }
    }
  },
  "outputSchema": {
    "oneOf": [
      {
        "type": "object",
        "required": [
          "ok",
          "tool",
          "mode",
          "liveDataFetched",
          "topic",
          "sources",
          "agoodealPage",
          "limits",
          "notice"
        ],
        "properties": {
          "ok": {
            "const": true
          },
          "tool": {
            "type": "string"
          },
          "mode": {
            "const": "source_discovery"
          },
          "liveDataFetched": {
            "const": false
          },
          "topic": {
            "type": "string"
          },
          "pageScope": {
            "type": [
              "string",
              "null"
            ]
          },
          "notice": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "maxItems": 5,
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "publisher",
                "kind",
                "url",
                "agoodealUse",
                "updateFrequency"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "datasetUrl": {
                  "type": "string"
                },
                "documentationUrl": {
                  "type": "string"
                },
                "agoodealUse": {
                  "type": "string"
                },
                "updateFrequency": {
                  "type": "string"
                }
              }
            }
          },
          "agoodealPage": {
            "type": "string"
          },
          "coverage": {
            "type": "string"
          },
          "limits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "howToUse": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "versionedContract": {
            "type": [
              "object",
              "null"
            ]
          }
        }
      },
      {
        "type": "object",
        "required": [
          "ok",
          "error"
        ],
        "properties": {
          "ok": {
            "const": false
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "enum": [
                  "invalid_json",
                  "invalid_argument",
                  "unknown_argument",
                  "internal_error"
                ]
              },
              "message": {
                "type": "string"
              },
              "field": {
                "type": "string"
              }
            }
          }
        }
      }
    ]
  },
  "privacy": "Returns stored source records only; no government data is fetched per call and nothing from the page is read. 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": "Transport Department journey time indicators (version 2) and time-varying toll schedule.",
  "limits": [
    "Journey times are indicator estimates, not guaranteed arrival times.",
    "Tolls come from a web page and PDF schedule, not an API."
  ],
  "officialSources": [
    {
      "id": "td-journey-time-v2",
      "name": "行車時間顯示器（第二代）",
      "publisher": "Transport Department",
      "kind": "xml_feed",
      "url": "https://resource.data.one.gov.hk/td/jss/Journeytimev2.xml"
    },
    {
      "id": "td-time-varying-tolls",
      "name": "過海隧道分時段收費",
      "publisher": "Transport Department",
      "kind": "web_page",
      "url": "https://www.td.gov.hk/tc/transport_in_hong_kong/tunnels_and_bridges_n/tvt/index.html"
    }
  ],
  "agoodealPage": "https://www.agoodeal.com/tools/cross-harbour-traffic/"
}
