{
  "descriptorVersion": "1.0.0",
  "name": "find_specialist_outpatient_sources",
  "title": "Specialist outpatient waiting time sources",
  "description": "Source discovery for Hospital Authority specialist outpatient new case waiting times: 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. Statistics for a past period; not an appointment date or medical 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": "source_discovery",
    "pageUrls": [
      "https://www.agoodeal.com/tools/specialist-outpatient-waiting-time/"
    ],
    "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",
          "waiting_time"
        ],
        "description": "Which official source to return. Omit for all. waiting_time: Specialist outpatient waiting times."
      }
    }
  },
  "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": "Hospital Authority stable new case waiting times by specialty and hospital cluster.",
  "limits": [
    "Past-period statistics, not an appointment date, diagnosis or quality ranking."
  ],
  "officialSources": [
    {
      "id": "ha-sop-waiting-time",
      "name": "專科門診新症輪候時間",
      "publisher": "Hospital Authority",
      "kind": "json_api",
      "url": "https://www.ha.org.hk/opendata/sop/sop-waiting-time-tc.json"
    }
  ],
  "agoodealPage": "https://www.agoodeal.com/tools/specialist-outpatient-waiting-time/"
}
