Skip to main content
Glama

station_crowd_forecast

Forecast MRT/LRT station crowdedness levels in 30-minute intervals to plan travel and avoid peak congestion.

Instructions

Get forecasted MRT/LRT station crowdedness levels in 30-minute intervals.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
trainLineYesCode of train network line (CCL, CEL, CGL, DTL, EWL, NEL, NSL, BPL, SLRT, PLRT, TEL)

Implementation Reference

  • The handler function for the 'station_crowd_forecast' tool. It extracts the 'trainLine' argument, makes an API call to LTA's PCDForecast endpoint, and returns the JSON response or an error message.
    case "station_crowd_forecast": {
      const { trainLine } = request.params.arguments as {
        trainLine: string;
      };
    
      try {
        const response = await axios.get('https://datamall2.mytransport.sg/ltaodataservice/PCDForecast', {
          params: {
            TrainLine: trainLine
          },
          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;
      }
    }
  • Input schema for the 'station_crowd_forecast' tool, defining the required 'trainLine' parameter with allowed enum values.
    inputSchema: {
      type: "object",
      properties: {
        trainLine: {
          type: "string",
          description: "Code of train network line (CCL, CEL, CGL, DTL, EWL, NEL, NSL, BPL, SLRT, PLRT, TEL)",
          enum: ["CCL", "CEL", "CGL", "DTL", "EWL", "NEL", "NSL", "BPL", "SLRT", "PLRT", "TEL"]
        }
      },
      required: ["trainLine"]
    }
  • src/index.ts:114-128 (registration)
    Registration of the 'station_crowd_forecast' tool in the ListTools response, including name, description, and input schema.
    {
      name: "station_crowd_forecast",
      description: "Get forecasted MRT/LRT station crowdedness levels in 30-minute intervals.",
      inputSchema: {
        type: "object",
        properties: {
          trainLine: {
            type: "string",
            description: "Code of train network line (CCL, CEL, CGL, DTL, EWL, NEL, NSL, BPL, SLRT, PLRT, TEL)",
            enum: ["CCL", "CEL", "CGL", "DTL", "EWL", "NEL", "NSL", "BPL", "SLRT", "PLRT", "TEL"]
          }
        },
        required: ["trainLine"]
      }
    }]
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'forecasted' and '30-minute intervals', giving some behavioral context about temporal scope. However, it lacks details on data freshness, accuracy, rate limits, authentication needs, or output format. For a forecasting tool with no annotations, this is a significant gap in behavioral disclosure.

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 key information: action, resource, and temporal detail. Every word earns its place with zero waste, making it highly concise and well-structured for quick comprehension.

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 one parameter with full schema coverage and no output schema, the description provides basic purpose and scope. However, as a forecasting tool with no annotations, it lacks details on reliability, data sources, or example outputs. It's minimally viable but leaves gaps in understanding practical use and limitations.

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?

Schema description coverage is 100%, with the parameter 'trainLine' fully documented in the schema including enum values. The description adds no parameter-specific information beyond what the schema provides. Baseline score of 3 is appropriate as the schema handles parameter semantics adequately.

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 ('Get forecasted') and resource ('MRT/LRT station crowdedness levels') with specific temporal granularity ('in 30-minute intervals'). It distinguishes from sibling 'station_crowding' by specifying 'forecasted' vs. likely current data, though not explicitly named. The purpose is specific and actionable.

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 future crowdedness predictions rather than real-time data, which differentiates it from 'station_crowding'. However, it lacks explicit when-to-use guidance, alternatives (e.g., vs. 'travel_times'), or prerequisites. Usage context is inferred but not clearly articulated.

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