Skip to main content
Glama

station_name_to_id

Convert EVE Online station names to their unique IDs using the ESI API. Input an array of station names (max 500) to retrieve corresponding IDs for navigation and traffic management.

Instructions

Convert EVE Online station names to their corresponding IDs using ESI API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stationNamesYesArray of station names to convert to IDs (max 500). Use English proper nouns only (e.g., 'Jita IV - Moon 4 - Caldari Navy Assembly Plant')

Implementation Reference

  • The main handler function (execute) for the station_name_to_id tool. It calls the ESI client to resolve station names to IDs and formats the JSON response.
    execute: async (args: { stationNames: string[] }) => { try { const results = await esiClient.getStationIds(args.stationNames); if (results.length === 0) { return JSON.stringify({ success: false, message: "No stations found with the provided names", results: [] }); } return JSON.stringify({ success: true, message: `Found ${results.length} station(s)`, results: results.map(station => ({ id: station.id, name: station.name, type: "station" })) }); } catch (error) { return JSON.stringify({ success: false, message: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`, results: [] }); } },
  • Zod schema defining the input parameters for the tool: an array of station names (1-500 strings).
    parameters: z.object({ stationNames: z.array(z.string()).min(1).max(500).describe("Array of station names to convert to IDs (max 500). Use English proper nouns only (e.g., 'Jita IV - Moon 4 - Caldari Navy Assembly Plant')") }),
  • src/server.ts:46-46 (registration)
    Registration of the stationNameToIdTool with the MCP server.
    server.addTool(stationNameToIdTool);
  • Helper method in ESIClient that resolves station names to IDs via ESI /universe/ids/ API endpoint.
    async getStationIds(stationNames: string[]): Promise<Array<{ id: number; name: string }>> { const result = await this.namesToIds(stationNames); return result.stations || []; }

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/kongyo2/eve-online-traffic-mcp'

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