Skip to main content
Glama

find_nearest_landmarks

Read-only

Locate the closest EVE Online landmarks from a specific solar system, providing sorted results with detailed descriptions and positions. Supports filtering by jump distance and result limit.

Instructions

Find the nearest EVE Online landmarks to a specified solar system. Returns landmarks sorted by distance with detailed information including descriptions and positions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of landmarks to return (1-50, default: 10)
maxJumpsNoMaximum jump distance to search (optional, filters out distant landmarks)
systemYesSolar system name (English proper noun like 'Jita') or ID to search from

Implementation Reference

  • The execute function that implements the tool's core logic: resolves the input system, fetches all landmarks from SDE, retrieves ESI data for locations and routes, calculates jump and euclidean distances, filters by maxJumps, sorts results, and returns formatted JSON with up to limit landmarks.
      maxJumps?: number;
    }) => {
      try {
        let systemId: number;
    
        // Convert system to ID if it's a string
        if (typeof args.system === 'string') {
          const systemResult = await esiClient.getSolarSystemIds([args.system]);
          if (systemResult.length === 0) {
            return JSON.stringify({
              success: false,
              message: `System '${args.system}' not found`,
              landmarks: []
            });
          }
          systemId = systemResult[0].id;
        } else {
          systemId = args.system;
        }
    
        // Get system information
        const systemInfo = await esiClient.getSolarSystemInfo(systemId);
        const systemNames = await esiClient.idsToNames([systemId]);
        const systemName = systemNames[0]?.name || `System ${systemId}`;
    
        // Get all landmarks from SDE
        const landmarkIds = await sdeClient.getAllLandmarkIds();
        
        if (landmarkIds.length === 0) {
          return JSON.stringify({
            success: false,
            message: "No landmarks found in database",
            landmarks: []
          });
        }
    
        const landmarkResults = [];
    
        // Process each landmark
        for (const landmarkId of landmarkIds) {
          try {
            const landmark = await sdeClient.getLandmarkById(landmarkId);
            
            // Skip if no location ID
            if (!landmark.locationID) {
              continue;
            }
    
            // Get landmark system information
            const landmarkSystemInfo = await esiClient.getSolarSystemInfo(landmark.locationID);
            const landmarkSystemNames = await esiClient.idsToNames([landmark.locationID]);
            const landmarkSystemName = landmarkSystemNames[0]?.name || `System ${landmark.locationID}`;
    
            // Get constellation info to determine region
            let regionId = null;
            try {
              const constellationInfo = await esiClient.getConstellationInfo(landmarkSystemInfo.constellation_id);
              regionId = constellationInfo.region_id;
            } catch (error) {
              // Skip region info if constellation lookup fails
            }
    
            // Calculate route distance
            let jumps = 0;
            let routeAvailable = true;
            
            try {
              const route = await esiClient.calculateRoute(systemId, landmark.locationID);
              jumps = route.length - 1;
            } catch (error) {
              routeAvailable = false;
            }
    
            // Skip if max jumps specified and exceeded
            if (args.maxJumps && jumps > args.maxJumps) {
              continue;
            }
    
            // Calculate euclidean distance if both positions are available
            let euclideanDistanceAU = null;
            if (landmark.position && systemInfo.position) {
              euclideanDistanceAU = calculateEuclideanDistance(systemInfo.position, landmark.position);
            }
    
            landmarkResults.push({
              landmark: {
                id: landmarkId,
                name: `Landmark ${landmarkId}`,
                description: `EVE Online landmark located in ${landmarkSystemName}`,
                position: landmark.position || null,
              },
              location: {
                system_id: landmark.locationID,
                system_name: landmarkSystemName,
                security_status: landmarkSystemInfo.security_status,
                constellation_id: landmarkSystemInfo.constellation_id,
                region_id: regionId,
              },
              distance: {
                jumps: routeAvailable ? jumps : null,
                route_available: routeAvailable,
                euclidean_distance_au: euclideanDistanceAU
              }
            });
          } catch (error) {
            // Skip problematic landmarks
            continue;
          }
        }
    
        // Sort by jumps (null values last), then by euclidean distance
        landmarkResults.sort((a, b) => {
          if (a.distance.jumps === null && b.distance.jumps === null) {
            // Both have no route, sort by euclidean distance
            if (a.distance.euclidean_distance_au === null && b.distance.euclidean_distance_au === null) return 0;
            if (a.distance.euclidean_distance_au === null) return 1;
            if (b.distance.euclidean_distance_au === null) return -1;
            return a.distance.euclidean_distance_au - b.distance.euclidean_distance_au;
          }
          if (a.distance.jumps === null) return 1;
          if (b.distance.jumps === null) return -1;
          
          // Both have routes, sort by jumps first
          if (a.distance.jumps !== b.distance.jumps) {
            return a.distance.jumps - b.distance.jumps;
          }
          
          // Same jump count, sort by euclidean distance
          if (a.distance.euclidean_distance_au === null && b.distance.euclidean_distance_au === null) return 0;
          if (a.distance.euclidean_distance_au === null) return 1;
          if (b.distance.euclidean_distance_au === null) return -1;
          return a.distance.euclidean_distance_au - b.distance.euclidean_distance_au;
        });
    
        // Apply limit
        const limit = args.limit || 10;
        const limitedResults = landmarkResults.slice(0, limit);
    
        return JSON.stringify({
          success: true,
          message: `Found ${limitedResults.length} nearest landmarks to ${systemName}`,
          origin: {
            system_id: systemId,
            system_name: systemName,
            security_status: systemInfo.security_status,
            position: systemInfo.position
          },
          landmarks: limitedResults,
          summary: {
            total_landmarks_checked: landmarkIds.length,
            landmarks_returned: limitedResults.length,
            closest_landmark: limitedResults.length > 0 ? {
              name: limitedResults[0].landmark.name,
              jumps: limitedResults[0].distance.jumps,
              description: limitedResults[0].landmark.description,
              euclidean_distance_au: limitedResults[0].distance.euclidean_distance_au
            } : null
          }
        });
      } catch (error) {
        return JSON.stringify({
          success: false,
          message: `Error finding nearest landmarks: ${error instanceof Error ? error.message : 'Unknown error'}`,
          landmarks: []
        });
      }
    },
  • Zod schema defining the input parameters for the tool: system (name or ID), optional limit (1-50), optional maxJumps (1-20).
    parameters: z.object({
      system: z.union([z.string(), z.number()]).describe("Solar system name (English proper noun like 'Jita') or ID to search from"),
      limit: z.number().min(1).max(50).optional().default(10).describe("Maximum number of landmarks to return (1-50, default: 10)"),
      maxJumps: z.number().min(1).max(20).optional().describe("Maximum jump distance to search (optional, filters out distant landmarks)")
    }),
  • src/server.ts:74-75 (registration)
    Registers the findNearestLandmarksTool with the FastMCP server instance.
    // Add landmark tools
    server.addTool(findNearestLandmarksTool);
  • Helper function to calculate Euclidean distance in AU between origin system position and landmark position, used for secondary sorting after jumps.
    function calculateEuclideanDistance(pos1: {x: number, y: number, z: number}, pos2: number[]): number {
      if (!pos2 || pos2.length < 3) return 0;
      
      const dx = pos1.x - pos2[0];
      const dy = pos1.y - pos2[1];
      const dz = pos1.z - pos2[2];
      
      // Convert from meters to AU (1 AU = 149,597,870.7 km = 149,597,870,700 m)
      const distanceMeters = Math.sqrt(dx * dx + dy * dy + dz * dz);
      const distanceAU = distanceMeters / 149597870700;
      
      return Math.round(distanceAU * 100) / 100; // Round to 2 decimal places
    }
Behavior4/5

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

Annotations indicate read-only and open-world hints, which the description does not contradict. The description adds behavioral context beyond annotations by specifying that results are sorted by distance and include detailed information like descriptions and positions, which is useful for understanding output behavior.

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 front-loaded with the core purpose in the first sentence, followed by return details. It uses two efficient sentences with no wasted words, making it easy to parse quickly.

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 moderate complexity, annotations cover safety (read-only, open-world), and schema fully describes inputs, the description is mostly complete. However, no output schema exists, and the description could provide more detail on return format (e.g., structure of 'detailed information'), leaving a minor gap.

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%, so the schema fully documents parameters. The description does not add meaning beyond the schema, as it does not explain parameter interactions or usage nuances. Baseline score of 3 is appropriate given high schema 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 ('Find'), resource ('nearest EVE Online landmarks'), and scope ('to a specified solar system'), with explicit mention of sorting and return details. It distinguishes from siblings like 'find_nearest_trade_hub' by focusing on general landmarks rather than trade hubs.

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 provides clear context for when to use this tool (finding landmarks near a solar system), but does not explicitly state when not to use it or name alternatives. Siblings like 'find_nearest_trade_hub' or 'solar_system_info' might be alternatives, but this is not addressed.

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