Scope: Hong Kong public datasets and government data.
Run SQL against a HK dataset — auto-routes to local mirror or httpfs.
This is the ONLY way to see resource content from HK gov sources.
Your host sandbox almost certainly does NOT whitelist data.gov.hk,
data.weather.gov.hk, or the CDN targets. Your MCP server DOES have
counts, trends, aggregates, or specific rows** — never respond "I don't
have network access to that data".
Batch pattern (recommended): call 3-5 times per turn to build up the aggregate story (e.g. per-year totals, per-station comparisons).
Two backends (transparent):
- local_mirror (returns
source="local_mirror", ~50ms): clean snake_case schema, no encoding gymnastics. Seehk_list_mirrorsfor what's available. HKO tables use columns: station_id, date, year, month, day, value (orrainfall_mmfor the rainfall table), completeness ('C' / '#' / '***'). - httpfs (returns
source="httpfs", seconds): DuckDB pulls the remote CSV live. Used for any non-mirrored dataset. HKO CIS raw CSVs use bilingual columns like"年/Year","月/Month","日/Day","數值/Value","數據完整性/data Completeness"— QUOTE them in SQL.
Args:
dataset_id: CKAN name (e.g. "hk-hko-rss-daily-total-rainfall").
resource_index: 0-based index into CSV resources (default 0).
Ignored for local-mirror datasets.
resource_name: alternative — pick by resource name (partial OK).
where: SQL WHERE clause without the "WHERE" keyword.
columns: list of SELECT expressions (default ["*"]).
group_by / order_by: SQL clauses without keywords.
limit: default 100, hard cap 10,000. Bump for full-history extracts.
skip: preamble rows to skip (httpfs only · auto-retries skip=2 on
HKO CIS title preamble; usually leave at 0).