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

Hong Kong Open Data MCP Server

Official

get_category_details

Retrieve comprehensive details about Hong Kong open data categories including datasets, users, groups, tags, and followers to explore government data resources.

Instructions

Get detailed information about a specific category (group)

Args: category_id: The ID or name of the category to retrieve include_datasets: Include a truncated list of the category's datasets include_dataset_count: Include the full package count include_extras: Include the category's extra fields include_users: Include the category's users include_groups: Include the category's sub groups include_tags: Include the category's tags include_followers: Include the category's number of followers language: Language code (en, tc, sc)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
category_idYes
include_dataset_countNo
include_datasetsNo
include_extrasNo
include_followersNo
include_groupsNo
include_tagsNo
include_usersNo
languageNoen

Implementation Reference

  • The handler function for the 'get_category_details' tool. It is decorated with @mcp.tool, which registers it with the MCP server. The function makes an API request to data.gov.hk's group_show endpoint to retrieve detailed category information based on the provided parameters.
    @mcp.tool async def get_category_details( category_id: str, include_datasets: bool = False, include_dataset_count: bool = True, include_extras: bool = True, include_users: bool = True, include_groups: bool = True, include_tags: bool = True, include_followers: bool = True, language: str = "en", ) -> Dict[str, Any]: """ Get detailed information about a specific category (group) Args: category_id: The ID or name of the category to retrieve include_datasets: Include a truncated list of the category's datasets include_dataset_count: Include the full package count include_extras: Include the category's extra fields include_users: Include the category's users include_groups: Include the category's sub groups include_tags: Include the category's tags include_followers: Include the category's number of followers language: Language code (en, tc, sc) """ base_url = BASE_URLS.get(language, BASE_URLS["en"]) url = f"{base_url}/group_show" params = { "id": category_id, "include_datasets": str(include_datasets).lower(), "include_dataset_count": str(include_dataset_count).lower(), "include_extras": str(include_extras).lower(), "include_users": str(include_users).lower(), "include_groups": str(include_groups).lower(), "include_tags": str(include_tags).lower(), "include_followers": str(include_followers).lower(), } 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