get_recent_launches
Retrieve a list of satellites launched in the past 30 days using N2YO Satellite Tracker MCP Server, enabling efficient tracking of recent space missions and orbital deployments.
Instructions
Get satellites launched in the last 30 days
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:1057-1073 (handler)Handler function that executes the get_recent_launches tool by calling the N2YO client and formatting the response as CallToolResult.private async getRecentLaunches(): Promise<CallToolResult> { const launches = await this.n2yoClient.getRecentLaunches(); return { content: [ { type: "text", text: JSON.stringify({ timeRange: "Last 30 days", recentLaunches: launches, count: launches.length, note: "Recently launched satellites with current position data" }, null, 2), }, ], }; }
- src/server.ts:277-283 (registration)Tool registration in the getTools() method, including name, description, and empty input schema (no parameters required).name: "get_recent_launches", description: "Get satellites launched in the last 30 days", inputSchema: { type: "object", properties: {}, }, },
- src/n2yo-client.ts:481-493 (helper)Supporting method in N2YO client that fetches recent launches from the last 30 days via API request.async getRecentLaunches(): Promise<RecentLaunch[]> { const now = new Date(); const thirtyDaysAgo = new Date(now.getTime() - 30 * 24 * 60 * 60 * 1000); const startDate = thirtyDaysAgo.toISOString().split('T')[0]; const endDate = now.toISOString().split('T')[0]; const response = await this.makeRequest(`/launchDate/${startDate}/${endDate}`, { startDate, endDate, }); return response.above || []; }
- src/server.ts:279-282 (schema)Input schema for the tool: empty object (no input parameters required).inputSchema: { type: "object", properties: {}, },
- src/server.ts:462-463 (registration)Dispatch case in callTool switch statement that routes to the handler.case "get_recent_launches": return await this.getRecentLaunches();