Skip to main content
Glama

region_name_to_id

Convert EVE Online region names into their corresponding IDs using the ESI API. Input an array of up to 500 region names for accurate ID mapping within the 'eve-online-traffic-mcp' server.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNamesYesArray of region names to convert to IDs (max 500). Use English proper nouns only (e.g., 'The Forge', 'Domain', 'Sinq Laison')

Implementation Reference

  • The execute function that implements the core logic of the region_name_to_id tool. It calls the ESI client to resolve region names to IDs, handles empty results and errors, and returns a formatted JSON response.
    execute: async (args: { regionNames: string[] }) => { try { const results = await esiClient.getRegionIds(args.regionNames); if (results.length === 0) { return JSON.stringify({ success: false, message: "No regions found with the provided names", results: [] }); } return JSON.stringify({ success: true, message: `Found ${results.length} region(s)`, results: results.map(region => ({ id: region.id, name: region.name, type: "region" })) }); } 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 up to 500 region names.
    parameters: z.object({ regionNames: z.array(z.string()).min(1).max(500).describe("Array of region names to convert to IDs (max 500). Use English proper nouns only (e.g., 'The Forge', 'Domain', 'Sinq Laison')") }),
  • src/server.ts:47-47 (registration)
    Registration of the regionNameToIdTool object with the FastMCP server.
    server.addTool(regionNameToIdTool);
  • Supporting helper method in ESIClient that filters region results from the universal namesToIds ESI API call.
    async getRegionIds(regionNames: string[]): Promise<Array<{ id: number; name: string }>> { const result = await this.namesToIds(regionNames); return result.regions || []; }
  • src/server.ts:3-6 (registration)
    Import of the regionNameToIdTool from name-to-id-tools.js for use in server registration.
    solarSystemNameToIdTool, stationNameToIdTool, regionNameToIdTool, universalNameToIdTool

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