Skip to main content
Glama

universal_name_to_id

Read-only

Convert EVE Online entity names like systems, stations, and regions into their corresponding IDs using the ESI API. Input up to 500 proper nouns in English.

Instructions

Convert EVE Online entity names (systems, stations, regions, etc.) to their corresponding IDs using ESI API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namesYesArray of entity names to convert to IDs (max 500). Use English proper nouns only (e.g., 'Jita', 'Caldari State', 'Tritanium')

Implementation Reference

  • Full MCP tool definition including handler (execute function), schema (parameters), name, description, and annotations. The execute function calls esiClient.namesToIds and processes results into a unified response.
    export const universalNameToIdTool = {
      annotations: {
        openWorldHint: true, // This tool interacts with external ESI API
        readOnlyHint: true, // This tool doesn't modify anything
        title: "Universal Name to ID",
      },
      description: "Convert EVE Online entity names (systems, stations, regions, etc.) to their corresponding IDs using ESI API",
      execute: async (args: { names: string[] }) => {
        try {
          const results = await esiClient.namesToIds(args.names);
          
          const allResults: Array<{ id: number; name: string; type: string }> = [];
          
          // Collect all results from different categories
          if (results.systems) {
            allResults.push(...results.systems.map(item => ({ ...item, type: "solar_system" })));
          }
          if (results.stations) {
            allResults.push(...results.stations.map(item => ({ ...item, type: "station" })));
          }
          if (results.regions) {
            allResults.push(...results.regions.map(item => ({ ...item, type: "region" })));
          }
          if (results.constellations) {
            allResults.push(...results.constellations.map(item => ({ ...item, type: "constellation" })));
          }
          if (results.corporations) {
            allResults.push(...results.corporations.map(item => ({ ...item, type: "corporation" })));
          }
          if (results.alliances) {
            allResults.push(...results.alliances.map(item => ({ ...item, type: "alliance" })));
          }
          if (results.characters) {
            allResults.push(...results.characters.map(item => ({ ...item, type: "character" })));
          }
          if (results.factions) {
            allResults.push(...results.factions.map(item => ({ ...item, type: "faction" })));
          }
          if (results.inventory_types) {
            allResults.push(...results.inventory_types.map(item => ({ ...item, type: "inventory_type" })));
          }
          if (results.agents) {
            allResults.push(...results.agents.map(item => ({ ...item, type: "agent" })));
          }
    
          if (allResults.length === 0) {
            return JSON.stringify({
              success: false,
              message: "No entities found with the provided names",
              results: []
            });
          }
    
          return JSON.stringify({
            success: true,
            message: `Found ${allResults.length} entity/entities`,
            results: allResults
          });
        } catch (error) {
          return JSON.stringify({
            success: false,
            message: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`,
            results: []
          });
        }
      },
      name: "universal_name_to_id",
      parameters: z.object({
        names: z.array(z.string()).min(1).max(500).describe("Array of entity names to convert to IDs (max 500). Use English proper nouns only (e.g., 'Jita', 'Caldari State', 'Tritanium')")
      }),
    };
  • src/server.ts:48-48 (registration)
    Registers the universalNameToIdTool with the FastMCP server.
    server.addTool(universalNameToIdTool);
  • Helper method in ESIClient that performs the actual ESI API call to convert names to IDs across multiple entity categories.
    async namesToIds(names: string[]): Promise<ESINameToIdResult> {
      if (names.length === 0) {
        throw new Error('Names array cannot be empty');
      }
      if (names.length > 500) {
        throw new Error('Maximum 500 names allowed per request');
      }
    
      const response = await fetch(`${this.baseUrl}/universe/ids/`, {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          'User-Agent': this.userAgent,
        },
        body: JSON.stringify(names),
      });
    
      if (!response.ok) {
        throw new Error(`ESI API error: ${response.status} ${response.statusText}`);
      }
    
      return await response.json() as ESINameToIdResult;
    }
  • TypeScript interface defining the structure of the ESI name-to-ID response used by the tool.
    export interface ESINameToIdResult {
      agents?: Array<{ id: number; name: string }>;
      alliances?: Array<{ id: number; name: string }>;
      characters?: Array<{ id: number; name: string }>;
      constellations?: Array<{ id: number; name: string }>;
      corporations?: Array<{ id: number; name: string }>;
      factions?: Array<{ id: number; name: string }>;
      inventory_types?: Array<{ id: number; name: string }>;
      regions?: Array<{ id: number; name: string }>;
      stations?: Array<{ id: number; name: string }>;
      systems?: Array<{ id: number; name: string }>;
    }
  • src/server.ts:2-6 (registration)
    Imports the universalNameToIdTool for registration in the MCP server.
    import {
      solarSystemNameToIdTool,
      stationNameToIdTool,
      regionNameToIdTool,
      universalNameToIdTool
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true, indicating a safe, read-only operation with potentially open-ended data. The description adds value by specifying the API used (ESI) and the scope of entity types, but does not disclose additional behavioral traits like rate limits, error handling, or response format. No contradiction with annotations exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary details. Every word contributes to understanding the tool's function, making it appropriately sized and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (single parameter, read-only operation) and rich annotations (readOnlyHint, openWorldHint), the description is mostly complete. However, the lack of an output schema means the description could benefit from mentioning the return format (e.g., IDs as integers) to fully inform the agent, though it's not critical given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the schema fully documenting the 'names' parameter (array of strings, max 500 items, English proper nouns). The description adds no additional parameter semantics beyond what the schema provides, such as examples or edge cases, so it meets the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Convert') and resource ('EVE Online entity names to IDs'), explicitly mentioning the types of entities covered (systems, stations, regions, etc.) and the API used (ESI). It distinguishes itself from sibling tools like 'region_name_to_id' and 'solar_system_name_to_id' by being universal across entity types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by specifying it converts names for various EVE Online entities, but does not explicitly state when to use this tool versus alternatives like 'region_name_to_id' or 'solar_system_name_to_id'. It provides some guidance through the input schema's description (e.g., 'Use English proper nouns only'), but lacks explicit when/when-not directives or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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