Skip to main content
Glama
manfye

Data.gov.my MCP Server

by manfye

get_catalogue_metadata

Fetch metadata for a specific dataset from Malaysia's official government data catalogue using its unique ID to access detailed information.

Instructions

Fetch metadata for a specific data catalogue by ID from GitHub.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the dataset (e.g., "air_pollution", "population")

Implementation Reference

  • The handler function for 'get_catalogue_metadata' tool. Validates input, fetches JSON metadata from GitHub repo 'data-gov-my/datagovmy-meta', decodes base64 content, parses it, and returns formatted text content with the metadata.
    } else if (name === 'get_catalogue_metadata') {
      if (!isCatalogueArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Missing required parameter: id');
      }
      
      console.error(`[GitHub] Fetching catalogue metadata for: ${args.id}`);
      const response = await this.githubAxios.get(`/repos/data-gov-my/datagovmy-meta/contents/data-catalogue/${args.id}.json`);
      
      // Decode the base64 content
      const content = Buffer.from(response.data.content, 'base64').toString('utf-8');
      const metadata = JSON.parse(content);
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              id: args.id,
              metadata,
              message: 'Catalogue metadata fetched successfully.'
            }, null, 2),
          },
        ],
      };
  • src/index.ts:83-92 (registration)
    Registration of the 'get_catalogue_metadata' tool in the ListTools response, including name, description, and input schema definition.
      name: 'get_catalogue_metadata',
      description: 'Fetch metadata for a specific data catalogue by ID from GitHub. do this before getting the data, if   "exclude_openapi": true, mean you cant get the catalogue data. update the user on this and recommend them to get from manual csv.',
      inputSchema: {
        type: 'object',
        properties: { 
          id: { type: 'string', description: 'ID of the dataset (e.g., "air_pollution", "population")' } 
        },
        required: ['id'],
      },
    },
  • Input schema definition for the 'get_catalogue_metadata' tool, specifying the required 'id' parameter.
      type: 'object',
      properties: { 
        id: { type: 'string', description: 'ID of the dataset (e.g., "air_pollution", "population")' } 
      },
      required: ['id'],
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action is to 'fetch metadata,' implying a read-only operation, but doesn't clarify aspects like authentication requirements, rate limits, error handling, or what metadata fields are returned. This leaves significant gaps for a tool interacting with GitHub.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action and resource. It wastes no words and is appropriately sized for a simple tool with one parameter, earning a high score for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (one parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on usage guidelines, behavioral traits, and output expectations, which are needed for full contextual understanding despite the simple schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'id' parameter well-documented in the schema itself. The description adds no additional meaning beyond implying the ID is for a data catalogue, which is already clear from the schema. This meets the baseline score of 3 when schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('fetch metadata') and resource ('specific data catalogue by ID from GitHub'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its siblings like 'get_catalogue_data' or 'search_catalogues', which likely have overlapping domains but different functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions fetching by ID but doesn't explain when to choose this over 'list_catalogue_ids' (for listing IDs) or 'search_catalogues' (for broader searches), leaving the agent to infer usage from tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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