naftiko: 1.0.0-alpha2 info: label: TransportAPI — Rail Information description: 'TransportAPI — Rail Information. 2 operations. Lead operation: Get Train Station Live Departures. Self-contained Naftiko capability covering one Transportapi business surface.' tags: - Transportapi - Rail Information created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TRANSPORTAPI_API_KEY: TRANSPORTAPI_API_KEY capability: consumes: - type: http namespace: transportapi-rail-information baseUri: https://transportapi.com/v3/uk description: TransportAPI — Rail Information business capability. Self-contained, no shared references. resources: - name: train-station-station_code-live.json path: /train/station/{station_code}/live.json operations: - name: gettrainstationlivedepartures method: GET description: Get Train Station Live Departures outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: station_code in: path type: string description: The CRS (Computer Reservation System) station code required: true - name: train_status in: query type: string description: Filter by train status - name: type in: query type: string description: Type of trains to include - name: app_id in: query type: string - name: app_key in: query type: string - name: train-station-station_code-date-time-timetable.json path: /train/station/{station_code}/{date}/{time}/timetable.json operations: - name: gettrainstationtimetable method: GET description: Get Train Station Timetable outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: station_code in: path type: string description: The CRS station code required: true - name: date in: path type: string description: Date for timetable (YYYY-MM-DD) required: true - name: time in: path type: string description: Time in HH:MM format required: true - name: app_id in: query type: string - name: app_key in: query type: string authentication: type: apikey key: X-App-Id value: '{{env.TRANSPORTAPI_API_KEY}}' placement: header exposes: - type: rest namespace: transportapi-rail-information-rest port: 8080 description: REST adapter for TransportAPI — Rail Information. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/train/station/{station-code}/live-json name: train-station-station-code-live-json description: REST surface for train-station-station_code-live.json. operations: - method: GET name: gettrainstationlivedepartures description: Get Train Station Live Departures call: transportapi-rail-information.gettrainstationlivedepartures with: station_code: rest.station_code train_status: rest.train_status type: rest.type app_id: rest.app_id app_key: rest.app_key outputParameters: - type: object mapping: $. - path: /v1/train/station/{station-code}/{date}/{time}/timetable-json name: train-station-station-code-date-time-timetable-json description: REST surface for train-station-station_code-date-time-timetable.json. operations: - method: GET name: gettrainstationtimetable description: Get Train Station Timetable call: transportapi-rail-information.gettrainstationtimetable with: station_code: rest.station_code date: rest.date time: rest.time app_id: rest.app_id app_key: rest.app_key outputParameters: - type: object mapping: $. - type: mcp namespace: transportapi-rail-information-mcp port: 9090 transport: http description: MCP adapter for TransportAPI — Rail Information. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: get-train-station-live-departures description: Get Train Station Live Departures hints: readOnly: true destructive: false idempotent: true call: transportapi-rail-information.gettrainstationlivedepartures with: station_code: tools.station_code train_status: tools.train_status type: tools.type app_id: tools.app_id app_key: tools.app_key outputParameters: - type: object mapping: $. - name: get-train-station-timetable description: Get Train Station Timetable hints: readOnly: true destructive: false idempotent: true call: transportapi-rail-information.gettrainstationtimetable with: station_code: tools.station_code date: tools.date time: tools.time app_id: tools.app_id app_key: tools.app_key outputParameters: - type: object mapping: $.