Skip to main content
Glama
mcp-open-data-hk

Hong Kong Open Data MCP Server

Official

get_dataset_details

Retrieve comprehensive information about specific Hong Kong government datasets, including metadata, resources, and optional tracking details for data analysis and research purposes.

Instructions

Get detailed information about a specific dataset

Args: dataset_id: The ID or name of the dataset to retrieve language: Language code (en, tc, sc) include_tracking: Add tracking information to dataset and resources

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_idYes
include_trackingNo
languageNoen

Implementation Reference

  • The handler function for the 'get_dataset_details' tool. It is decorated with @mcp.tool for registration and fetches detailed dataset information from the data.gov.hk API using the package_show endpoint, supporting language selection and optional tracking summary.
    @mcp.tool async def get_dataset_details( dataset_id: str, language: str = "en", include_tracking: bool = False ) -> Dict[str, Any]: """ Get detailed information about a specific dataset Args: dataset_id: The ID or name of the dataset to retrieve language: Language code (en, tc, sc) include_tracking: Add tracking information to dataset and resources """ base_url = BASE_URLS.get(language, BASE_URLS["en"]) url = f"{base_url}/package_show" params = {"id": dataset_id} if include_tracking: params["include_tracking"] = "true" result = await make_api_request(url, params) if result.get("success"): return result["result"] else: raise Exception(f"API Error: {result.get('error', 'Unknown error')}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcp-open-data-hk/mcp-open-data-hk'

If you have feedback or need assistance with the MCP directory API, please join our Discord server