Skip to main content
Glama

carpark_availability

Check real-time parking lot availability for HDB, LTA, and URA carparks in Singapore. Get minute-by-minute updates to find parking spaces.

Instructions

Get real-time availability of parking lots for HDB, LTA, and URA carparks. Updates every minute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The switch case handler that executes the carpark_availability tool. It fetches real-time car park availability data from the LTA DataMall API (CarParkAvailabilityv2 endpoint) using axios, handles the response by returning JSON-formatted data, and includes error handling for API errors.
    case "carpark_availability": {
      try {
        const response = await axios.get('https://datamall2.mytransport.sg/ltaodataservice/CarParkAvailabilityv2', {
          headers: {
            'AccountKey': process.env.LTA_API_KEY!,
            'accept': 'application/json'
          }
        });
        
        return {
          content: [{
            type: "text",
            text: JSON.stringify(response.data, null, 2)
          }]
        };
      } catch (error) {
        if (axios.isAxiosError(error)) {
          return {
            content: [{
              type: "text",
              text: `LTA API error: ${error.response?.data?.Message ?? error.message}`
            }],
            isError: true
          };
        }
        throw error;
      }
    }
  • src/index.ts:90-97 (registration)
    Registration of the carpark_availability tool in the ListToolsRequestSchema handler. Defines the tool name, description, and input schema (no required parameters). This makes the tool discoverable by MCP clients.
    {
      name: "carpark_availability",
      description: "Get real-time availability of parking lots for HDB, LTA, and URA carparks. Updates every minute.",
      inputSchema: {
        type: "object",
        properties: {} // No parameters needed
      }
    },
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: real-time data, updates every minute, and coverage of specific carpark types (HDB, LTA, URA). However, it does not mention potential limitations like rate limits, authentication needs, or error conditions, leaving some gaps.

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 front-loaded with the core purpose in the first clause and adds only one additional sentence for context ('Updates every minute.'). It is highly efficient with zero wasted words, making it easy to parse quickly.

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 simplicity (0 parameters, no output schema, no annotations), the description is adequate but could be more complete. It covers what the tool does and update frequency, but lacks details on output format, error handling, or data freshness guarantees, which would help an agent use it more effectively.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately does not discuss parameters, earning a baseline score of 4 for not adding unnecessary information beyond the schema.

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

Purpose5/5

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

The description clearly states the specific action ('Get real-time availability') and resource ('parking lots for HDB, LTA, and URA carparks'), distinguishing it from sibling tools like bus_arrival or traffic_incidents by focusing on parking availability rather than transportation incidents or forecasts.

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

Usage Guidelines3/5

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

The description implies usage for real-time parking availability checks, but provides no explicit guidance on when to use this tool versus alternatives (e.g., no mention of other parking-related tools or scenarios where it might not be applicable). It lacks clear exclusions or named alternatives.

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/arjunkmrm/mcp-sg-lta'

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