odpt_train_timetable

Pack: odpt · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/odpt_train_timetable for the schema, then POST the same URL with its arguments for the data.

Stop-by-stop scheduled timetable for one specific Japanese train run, by railway and train number: every station it calls at with arrival/departure time. Covers Tokyo Metro, JR East, Toei and other Japan railway operators. Train numbers come from odpt_station_timetable rows. Needs an ODPT developer consumer key via _apiKey; Pipeworx supplies one if omitted. Example: odpt_train_timetable({ railway: “odpt.Railway:JR-East.Yamanote”, train_number: “1234G” }).

Parameters

NameTypeRequiredDescription
railwaystringyesExact odpt.Railway id, e.g. “odpt.Railway:JR-East.Yamanote” or “odpt.Railway:TokyoMetro.Marunouchi”.
train_numberstringyesThe train number as shown in a station timetable row, e.g. “1234G”.
_apiKeystringyesOptional: your own ODPT developer consumer key. Pipeworx supplies one if omitted.

Example call

Arguments

{
  "railway": "odpt.Railway:Toei.Mita",
  "train_number": "535T"
}

curl

curl -X POST https://gateway.pipeworx.io/odpt/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"odpt_train_timetable","arguments":{"railway":"odpt.Railway:Toei.Mita","train_number":"535T"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('odpt_train_timetable', {
  "railway": "odpt.Railway:Toei.Mita",
  "train_number": "535T"
});

Response shape

FieldTypeDescription
sourcestring
railwaystring
train_numberstring
timetablesarray
data_as_ofstring
Full JSON Schema
{
  "type": "object",
  "properties": {
    "source": {
      "type": "string"
    },
    "railway": {
      "type": "string"
    },
    "train_number": {
      "type": "string"
    },
    "timetables": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "@id": {
            "type": "string"
          },
          "@type": {
            "type": "string"
          },
          "dc:date": {
            "type": "string"
          },
          "@context": {
            "type": "string"
          },
          "dct:issued": {
            "type": "string"
          },
          "odpt:train": {
            "type": "string"
          },
          "owl:sameAs": {
            "type": "string"
          },
          "odpt:railway": {
            "type": "string"
          },
          "odpt:calendar": {
            "type": "string"
          },
          "odpt:operator": {
            "type": "string"
          },
          "odpt:trainType": {
            "type": "string"
          },
          "odpt:trainNumber": {
            "type": "string"
          },
          "odpt:originStation": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "odpt:railDirection": {
            "type": "string"
          },
          "odpt:destinationStation": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "odpt:trainTimetableObject": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "odpt:departureTime": {
                  "type": "string"
                },
                "odpt:platformNumber": {
                  "type": "string"
                },
                "odpt:departureStation": {
                  "type": "string"
                },
                "odpt:arrivalTime": {
                  "type": "string"
                },
                "odpt:arrivalStation": {
                  "type": "string"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      }
    },
    "data_as_of": {
      "type": "string"
    }
  },
  "additionalProperties": true
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the odpt pack
{
  "mcpServers": {
    "odpt": {
      "url": "https://gateway.pipeworx.io/odpt/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build November 10, 2026