Skip to content
Eden Engine

Japan Rail: Stations Nearest a Point

heartrailsexpress/nearest-stations

Returns the railway stations nearest a longitude and latitude in Japan, each with its line, prefecture, postal code, distance in metres and the previous and next station on the line. A station on several lines appears once per line. Data from HeartRails Express, served by Eden Engine; not an official HeartRails product.

activeper callv1

Price

$0.0026 per call

You pay the price shown. If a call turns out to cost more than its quote, you pay the actual price, capped at twice the quote. No monthly minimum. Top-ups start at $0.50.

Data source

HeartRails Express

Railway line and station data from HeartRails Express (express.heartrails.com), whose API page asks for a credit to "HeartRails Express" where the data is used. Passed through unmodified. Served by Eden Engine; not an official HeartRails product.

Use it

Five steps: search, inspect, learn, run, settle. No per-tool setup; your agent reaches this tool through the meta-tools it already has.

Connect once and your AI can find and run this tool, and any other it needs.

agent
// 1. search: find the tool
omnial_search({ query: "what you need" })

// 2. inspect: price and input schema
omnial_inspect({ tool: "heartrailsexpress/nearest-stations" })

// 3. learn: read the usage guide at runtime
omnial_learn({ tool: "heartrailsexpress/nearest-stations" })

// 4. run: price the exact call first, then run it
omnial_execute({ tool: "heartrailsexpress/nearest-stations", input: { /* see input_schema */ }, dry_run: true })
omnial_execute({ tool: "heartrailsexpress/nearest-stations", input: { /* ... */ } })

// 5. settle: the call is charged when it finishes, nothing to do

Not connected yet? Point your MCP client at https://mcp.eden-engine.com/mcp, then copy a config for your client.

Pricing

Every charge this tool can incur.

ChargePrice
Per call
$0.0026
Updated
Oct 21, 2026

Input and output schemas

Input schema
input_schema.json
{
  "type": "object",
  "required": [
    "x",
    "y"
  ],
  "properties": {
    "x": {
      "type": "number",
      "maximum": 154,
      "minimum": 122,
      "description": "Longitude in decimal degrees, for example 139.7671."
    },
    "y": {
      "type": "number",
      "maximum": 46,
      "minimum": 20,
      "description": "Latitude in decimal degrees, for example 35.6812."
    }
  },
  "additionalProperties": false
}
Output schema
output_schema.json
{
  "type": "object",
  "required": [
    "response"
  ],
  "properties": {
    "response": {
      "type": "object",
      "required": [
        "station"
      ],
      "properties": {
        "station": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "name",
              "prefecture",
              "line"
            ],
            "properties": {
              "x": {
                "type": "number",
                "description": "Longitude in decimal degrees."
              },
              "y": {
                "type": "number",
                "description": "Latitude in decimal degrees."
              },
              "line": {
                "type": "string",
                "description": "The railway line, in Japanese. A station on several lines appears once per line."
              },
              "name": {
                "type": "string",
                "description": "The station name in Japanese."
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The next station on the line; null at the end of a line."
              },
              "prev": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The previous station on the line; null at the end of a line."
              },
              "postal": {
                "type": "string",
                "description": "The seven-digit postal code of the station."
              },
              "distance": {
                "type": "string",
                "description": "Only for the nearest-stations lookup: the distance from the given point, such as `320m`."
              },
              "prefecture": {
                "type": "string",
                "description": "The prefecture, in Japanese."
              }
            },
            "additionalProperties": true
          },
          "description": "The stations found; empty when none match."
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}