Skip to main content
Glama

stargate_info

Retrieve detailed stargate data, including connections and positions, for EVE Online using ESI and SDE APIs. Input up to 50 stargate IDs to access precise navigation and system information.

Instructions

Get comprehensive stargate information from both ESI and SDE APIs, including connections and positions

Input Schema

NameRequiredDescriptionDefault
stargateIdsYesArray of stargate IDs to get information for (max 50). Use numeric IDs only, not names.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "stargateIds": { "description": "Array of stargate IDs to get information for (max 50). Use numeric IDs only, not names.", "items": { "type": "number" }, "maxItems": 50, "minItems": 1, "type": "array" } }, "required": [ "stargateIds" ], "type": "object" }

Implementation Reference

  • The main handler function for the 'stargate_info' tool. It processes an array of stargate IDs, fetches data from both ESI and SDE clients, combines the data using combineStargateData, and returns formatted JSON results.
    execute: async (args: { stargateIds: number[] }) => { try { const results: CombinedStargateInfo[] = []; for (const stargateId of args.stargateIds) { let esiData: ESIStargateInfo | undefined; let sdeData: SDEStargateInfo | undefined; // Fetch from ESI try { esiData = await esiClient.getStargateInfo(stargateId); } catch (error) { console.warn(`Failed to fetch ESI data for stargate ${stargateId}:`, error); } // Fetch from SDE try { sdeData = await sdeClient.getStargateInfo(stargateId); } catch (error) { console.warn(`Failed to fetch SDE data for stargate ${stargateId}:`, error); } const combined = await combineStargateData(esiData, sdeData); if (combined) { results.push(combined); } } if (results.length === 0) { return JSON.stringify({ success: false, message: "No stargate information found for the provided IDs", results: [] }); } return JSON.stringify({ success: true, message: `Found information for ${results.length} stargate(s)`, results: results }); } catch (error) { return JSON.stringify({ success: false, message: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`, results: [] }); } },
  • Input schema definition using Zod, specifying the stargateIds parameter as an array of numbers (1-50 items).
    name: "stargate_info", parameters: z.object({ stargateIds: z.array(z.number()).min(1).max(50).describe("Array of stargate IDs to get information for (max 50). Use numeric IDs only, not names.") }),
  • src/server.ts:52-52 (registration)
    Registration of the stargateInfoTool object into the FastMCP server instance.
    server.addTool(stargateInfoTool);
  • Helper function that combines ESI and SDE stargate data, resolves names using ESI idsToNames, and formats into CombinedStargateInfo.
    async function combineStargateData( esiData?: ESIStargateInfo, sdeData?: SDEStargateInfo ): Promise<CombinedStargateInfo | null> { if (!esiData && !sdeData) return null; const stargateId = esiData?.stargate_id || sdeData?.stargateID; if (!stargateId) return null; // Collect IDs that need names const idsToResolve: number[] = []; const systemId = esiData?.system_id || sdeData?.solarSystemID || 0; const destStargateId = esiData?.destination?.stargate_id || sdeData?.destinationStargateID || 0; const destSystemId = esiData?.destination?.system_id || sdeData?.destinationSolarSystemID || 0; if (systemId) idsToResolve.push(systemId); if (destStargateId) idsToResolve.push(destStargateId); if (destSystemId) idsToResolve.push(destSystemId); // Resolve names let nameMap = new Map<number, string>(); if (idsToResolve.length > 0) { try { const nameResults = await esiClient.idsToNames(idsToResolve); nameMap = new Map(nameResults.map(result => [result.id, result.name])); } catch (error) { console.warn('Failed to fetch names for stargate data:', error); } } return { stargate_id: stargateId, name: esiData?.name, system_id: systemId, system_name: nameMap.get(systemId), type_id: esiData?.type_id || sdeData?.typeID, position: { x: esiData?.position?.x || (sdeData?.position ? sdeData.position[0] : 0), y: esiData?.position?.y || (sdeData?.position ? sdeData.position[1] : 0), z: esiData?.position?.z || (sdeData?.position ? sdeData.position[2] : 0), }, destination: { stargate_id: destStargateId, stargate_name: nameMap.get(destStargateId), system_id: destSystemId, system_name: nameMap.get(destSystemId), }, source: { esi: !!esiData, sde: !!sdeData, }, esi_data: esiData, sde_data: sdeData, }; }
  • TypeScript interface defining the structure of the combined stargate information returned by the tool.
    export interface CombinedStargateInfo { stargate_id: number; name?: string; system_id: number; system_name?: string; type_id?: number; position: { x: number; y: number; z: number; }; destination: { stargate_id: number; stargate_name?: string; system_id: number; system_name?: string; }; source: { esi: boolean; sde: boolean; }; esi_data?: ESIStargateInfo; sde_data?: SDEStargateInfo; }

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