Skip to main content
Glama
manfye

Data.gov.my MCP Server

by manfye

list_catalogue_ids

Retrieve available data catalogue IDs from the Data.gov.my MCP Server to access Malaysia's government open datasets directly from the GitHub repository.

Instructions

Fetch list of available data catalogue IDs from GitHub repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Implements the core logic for the 'list_catalogue_ids' tool: fetches the contents of the data-catalogue directory from the GitHub repository, filters for JSON files, extracts IDs, and returns a JSON-formatted list.
    if (name === 'list_catalogue_ids') { console.error('[GitHub] Fetching catalogue list from GitHub...'); const response = await this.githubAxios.get('/repos/data-gov-my/datagovmy-meta/contents/data-catalogue'); const catalogues = (response.data as GitHubFile[]) .filter((item: GitHubFile) => item.type === 'file' && item.name.endsWith('.json')) .map((item: GitHubFile) => ({ id: item.name.replace('.json', ''), name: item.name, download_url: item.download_url, size: item.size })); return { content: [ { type: 'text', text: JSON.stringify({ catalogues, count: catalogues.length, message: 'Catalogue IDs fetched successfully from GitHub.' }, null, 2), }, ], };
  • src/index.ts:77-81 (registration)
    Registers the 'list_catalogue_ids' tool in the MCP server's listTools response, including name, description, and schema for no input parameters.
    { name: 'list_catalogue_ids', description: 'Fetch list of available data catalogue IDs from GitHub repository.', inputSchema: { type: 'object', properties: {}, required: [] }, },
  • Defines the input schema for 'list_catalogue_ids' tool as an empty object (no parameters required).
    description: 'Fetch list of available data catalogue IDs from GitHub repository.', inputSchema: { type: 'object', properties: {}, required: [] }, },

Other Tools

Related Tools

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/manfye/data-dosm-mcp-nodejs'

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