Skip to main content
Glama
MaxwellCalkin

N2YO Satellite Tracker MCP Server

get_satellite_trajectory

Calculate satellite trajectory over time for visualization using NORAD ID and observer coordinates to track orbital paths.

Instructions

Get satellite trajectory over time period for visualization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noradIdYesNORAD catalog number of the satellite
observerLatYesObserver latitude in degrees
observerLngYesObserver longitude in degrees
observerAltNoObserver altitude in meters above sea level
secondsNoTime period in seconds for trajectory (max 3600)

Implementation Reference

  • Main handler function for the get_satellite_trajectory tool. Validates input, fetches trajectory data from N2YOClient, and returns formatted JSON response.
    private async getSatelliteTrajectory(args: any): Promise<CallToolResult> { SatelliteValidator.validatePositionRequest(args); const trajectory = await this.n2yoClient.getSatelliteTrajectory( args.noradId, args.observerLat, args.observerLng, args.observerAlt || 0, args.seconds || 300 ); return { content: [ { type: "text", text: JSON.stringify({ satellite: { noradId: args.noradId }, observer: { latitude: args.observerLat, longitude: args.observerLng, altitude: args.observerAlt || 0, }, timeSpan: args.seconds || 300, trajectory: trajectory, count: trajectory.length, note: "Position data points over time for trajectory visualization" }, null, 2), }, ], }; }
  • src/server.ts:317-353 (registration)
    Tool registration in getTools() method, including name, description, and input schema definition.
    { name: "get_satellite_trajectory", description: "Get satellite trajectory over time period for visualization", inputSchema: { type: "object", properties: { noradId: { type: "string", description: "NORAD catalog number of the satellite", }, observerLat: { type: "number", description: "Observer latitude in degrees", minimum: -90, maximum: 90, }, observerLng: { type: "number", description: "Observer longitude in degrees", minimum: -180, maximum: 180, }, observerAlt: { type: "number", description: "Observer altitude in meters above sea level", default: 0, }, seconds: { type: "number", description: "Time period in seconds for trajectory (max 3600)", default: 300, maximum: 3600, }, }, required: ["noradId", "observerLat", "observerLng"], }, },
  • Input schema for validating tool arguments: requires noradId, observer location, optional alt and seconds.
    inputSchema: { type: "object", properties: { noradId: { type: "string", description: "NORAD catalog number of the satellite", }, observerLat: { type: "number", description: "Observer latitude in degrees", minimum: -90, maximum: 90, }, observerLng: { type: "number", description: "Observer longitude in degrees", minimum: -180, maximum: 180, }, observerAlt: { type: "number", description: "Observer altitude in meters above sea level", default: 0, }, seconds: { type: "number", description: "Time period in seconds for trajectory (max 3600)", default: 300, maximum: 3600, }, }, required: ["noradId", "observerLat", "observerLng"], }, },
  • Helper method in N2YOClient that computes satellite trajectory by sampling positions at multiple time steps.
    async getSatelliteTrajectory( noradId: string, observerLat: number, observerLng: number, observerAlt: number = 0, seconds: number = 300 ): Promise<SatellitePosition[]> { // Get multiple positions over time to show trajectory const positions = []; const steps = Math.min(10, Math.max(2, Math.floor(seconds / 30))); // Max 10 points for (let i = 0; i <= steps; i++) { const timeOffset = Math.floor((seconds / steps) * i); const stepPositions = await this.getPositions(noradId, observerLat, observerLng, observerAlt, timeOffset); if (stepPositions.length > 0) { positions.push(stepPositions[0]); } } return positions; }

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/MaxwellCalkin/N2YO-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server