get_space_debris
Track space debris above a specific location using latitude, longitude, and optional altitude and search radius with N2YO Satellite Tracker MCP Server.
Instructions
Get space debris currently above an observer location
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| observerAlt | No | Observer altitude in meters above sea level | |
| observerLat | Yes | Observer latitude in degrees | |
| observerLng | Yes | Observer longitude in degrees | |
| searchRadius | No | Search radius in degrees (max 90) |
Implementation Reference
- src/server.ts:1075-1103 (handler)Main handler function for the 'get_space_debris' tool. Validates arguments, calls the N2YO client method, and formats the response as JSON.private async getSpaceDebris(args: any): Promise<CallToolResult> { SatelliteValidator.validateAboveRequest(args); const debris = await this.n2yoClient.getSpaceDebris( args.observerLat, args.observerLng, args.observerAlt || 0, args.searchRadius || 70 ); return { content: [ { type: "text", text: JSON.stringify({ observer: { latitude: args.observerLat, longitude: args.observerLng, altitude: args.observerAlt || 0, }, searchRadius: args.searchRadius || 70, spaceDebris: debris, count: debris.length, warning: "Space debris tracking is important for collision avoidance" }, null, 2), }, ], }; }
- src/server.ts:284-316 (registration)Registration of the 'get_space_debris' tool in the getTools() method, including name, description, and input schema.{ name: "get_space_debris", description: "Get space debris currently above an observer location", inputSchema: { type: "object", properties: { 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, }, searchRadius: { type: "number", description: "Search radius in degrees (max 90)", default: 70, maximum: 90, }, }, required: ["observerLat", "observerLng"], }, },
- src/n2yo-client.ts:536-551 (helper)Helper method in N2YOClient that retrieves satellites above the location using category 0 and renames them as space debris for the tool.getSpaceDebris( observerLat: number, observerLng: number, observerAlt: number = 0, searchRadius: number = 70 ): Promise<SatelliteAbove[]> { // Debris is typically in category 0 (uncategorized) or special debris categories // For mock purposes, we'll return some fictional debris objects return this.getSatellitesAbove(observerLat, observerLng, observerAlt, searchRadius, 0).then(sats => { return sats.map(sat => ({ ...sat, satname: `DEBRIS-${sat.satid}`, launchDate: "UNKNOWN" })).slice(0, 5); // Limit debris results }); }