Skip to main content
Glama

region_info

Read-only

Retrieve detailed EVE Online region data, including constellations, systems, and boundaries, by providing numeric region IDs using ESI and SDE APIs.

Instructions

Get comprehensive region information from both ESI and SDE APIs, including constellations, systems, and boundaries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionIdsYesArray of region IDs to get information for (max 50). Use numeric IDs only, not names. Use region_name_to_id tool to convert names to IDs first.

Implementation Reference

  • The complete definition of the 'region_info' tool object, including the execute handler function that fetches and combines region data from ESI and SDE APIs.
    export const regionInfoTool = {
      annotations: {
        openWorldHint: true, // This tool interacts with external APIs
        readOnlyHint: true, // This tool doesn't modify anything
        title: "Region Information",
      },
      description: "Get comprehensive region information from both ESI and SDE APIs, including constellations, systems, and boundaries",
      execute: async (args: { regionIds: number[] }) => {
        try {
          const results: CombinedRegionInfo[] = [];
    
          for (const regionId of args.regionIds) {
            let esiData: ESIRegionInfo | undefined;
            let sdeData: SDERegionInfo | undefined;
    
            // Fetch from ESI
            try {
              esiData = await esiClient.getRegionInfo(regionId);
            } catch (error) {
              console.warn(`Failed to fetch ESI data for region ${regionId}:`, error);
            }
    
            // Fetch from SDE
            try {
              sdeData = await sdeClient.getRegionInfo(regionId);
            } catch (error) {
              console.warn(`Failed to fetch SDE data for region ${regionId}:`, error);
            }
    
            const combined = await combineRegionData(esiData, sdeData);
            if (combined) {
              results.push(combined);
            }
          }
    
          if (results.length === 0) {
            return JSON.stringify({
              success: false,
              message: "No region information found for the provided IDs",
              results: []
            });
          }
    
          return JSON.stringify({
            success: true,
            message: `Found information for ${results.length} region(s)`,
            results: results
          });
        } catch (error) {
          return JSON.stringify({
            success: false,
            message: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`,
            results: []
          });
        }
      },
      name: "region_info",
      parameters: z.object({
        regionIds: z.array(z.number()).min(1).max(50).describe("Array of region IDs to get information for (max 50). Use numeric IDs only, not names. Use region_name_to_id tool to convert names to IDs first.")
      }),
    };
  • Zod schema defining the input parameters for the region_info tool: an array of region IDs.
    parameters: z.object({
      regionIds: z.array(z.number()).min(1).max(50).describe("Array of region IDs to get information for (max 50). Use numeric IDs only, not names. Use region_name_to_id tool to convert names to IDs first.")
    }),
  • src/server.ts:55-58 (registration)
    Registration of the regionInfoTool (region_info) by adding it to the FastMCP server.
    // Add region information tools
    server.addTool(regionInfoTool);
    server.addTool(constellationInfoTool);
    server.addTool(regionSystemsListTool);
  • Helper function to combine ESI and SDE region data, resolve constellation and system names, and build comprehensive region info.
    async function combineRegionData(
      esiData?: ESIRegionInfo,
      sdeData?: SDERegionInfo
    ): Promise<CombinedRegionInfo | null> {
      if (!esiData && !sdeData) return null;
    
      const regionId = esiData?.region_id || sdeData?.regionID;
      if (!regionId) return null;
    
      // Collect all IDs that need names
      const idsToResolve: number[] = [];
      const constellationIds = esiData?.constellations || (sdeData?.constellations?.map(id => parseInt(id)) || []);
      
      idsToResolve.push(...constellationIds);
    
      // Get all systems in the region by fetching constellation data
      const systemIds: number[] = [];
      if (constellationIds.length > 0) {
        for (const constId of constellationIds) {
          try {
            const constInfo = await esiClient.getConstellationInfo(constId);
            systemIds.push(...constInfo.systems);
          } catch (error) {
            console.warn(`Failed to fetch constellation ${constId}:`, error);
          }
        }
      }
    
      idsToResolve.push(...systemIds);
    
      // 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 region data:', error);
        }
      }
    
      return {
        region_id: regionId,
        name: esiData?.name || `Region ${regionId}`,
        description: esiData?.description,
        position: sdeData?.center ? {
          x: sdeData.center[0],
          y: sdeData.center[1],
          z: sdeData.center[2],
        } : undefined,
        bounds: (sdeData?.max && sdeData?.min) ? {
          max: { x: sdeData.max[0], y: sdeData.max[1], z: sdeData.max[2] },
          min: { x: sdeData.min[0], y: sdeData.min[1], z: sdeData.min[2] },
        } : undefined,
        constellations: constellationIds.map(id => {
          const name = nameMap.get(id);
          return name ? `${id} (${name})` : `${id}`;
        }),
        systems: systemIds.length > 0 ? systemIds.map(id => {
          const name = nameMap.get(id);
          return name ? `${id} (${name})` : `${id}`;
        }) : undefined,
        source: {
          esi: !!esiData,
          sde: !!sdeData,
        },
        esi_data: esiData,
        sde_data: sdeData,
      };
    }
  • TypeScript interface defining the structure of combined region information used by the tool.
    export interface CombinedRegionInfo {
      region_id: number;
      name: string;
      description?: string;
      position?: {
        x: number;
        y: number;
        z: number;
      };
      bounds?: {
        max: { x: number; y: number; z: number };
        min: { x: number; y: number; z: number };
      };
      constellations: string[];
      systems?: string[];
      source: {
        esi: boolean;
        sde: boolean;
      };
      esi_data?: ESIRegionInfo;
      sde_data?: SDERegionInfo;
    }
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, indicating safe, non-destructive operations with potentially large data. The description adds value by specifying data sources (ESI and SDE APIs) and content types (constellations, systems, boundaries), but doesn't detail rate limits, authentication needs, or pagination behavior beyond annotations.

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, dense sentence that efficiently conveys purpose, sources, and content without redundancy. It's front-loaded with the core action and avoids unnecessary elaboration, making every word count.

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 complexity (multi-API data aggregation), lack of output schema, and rich annotations, the description is mostly complete. It covers what data is retrieved and from where, but could benefit from mentioning output format or handling of large datasets to fully compensate for the missing output schema.

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 'regionIds' parameter (array of numeric IDs, max 50, requires conversion via 'region_name_to_id'). The description doesn't add parameter-specific semantics beyond what the schema provides, 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 action ('Get comprehensive region information') and specifies the resources ('from both ESI and SDE APIs, including constellations, systems, and boundaries'). It distinguishes from siblings like 'region_name_to_id' (conversion tool) and 'region_systems_list' (limited to systems only) by emphasizing comprehensive multi-source data.

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 for comprehensive region data needs, and the input schema provides guidance on converting names to IDs via 'region_name_to_id'. However, it doesn't explicitly state when to choose this over alternatives like 'region_systems_list' or 'solar_system_info' for specific data subsets.

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