track_multiple_callsigns
Monitor multiple ham radio callsigns simultaneously using the APRS.fi API for real-time position tracking and data analysis.
Instructions
Track multiple callsigns at once
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | No | APRS.fi API key (optional if set via /set-api-key) | |
| callsigns | Yes | Array of callsigns to track |
Implementation Reference
- index.ts:172-229 (handler)Core handler function that fetches current APRS positions for multiple callsigns by joining them in the API query parameter and parsing the response.async getMultiplePositions(callsigns: string[], apiKey?: string): Promise<APRSPosition[]> { const keyToUse = apiKey || this.apiKey; if (!keyToUse) { throw new APRSError('APRS API key not provided. Use /set-api-key command or provide apiKey parameter.'); } if (!callsigns?.length) { return []; } const cleanCallsigns = callsigns .map(c => c.trim().toUpperCase()) .filter(c => c.length > 0); if (cleanCallsigns.length === 0) { return []; } const params = new URLSearchParams({ name: cleanCallsigns.join(','), what: 'loc', apikey: keyToUse, format: 'json' }); try { const response = await fetch(`${this.baseUrl}?${params}`); if (!response.ok) { throw new APRSError( `APRS API request failed: ${response.status} ${response.statusText}`, response.status ); } const data: APRSResponse = await response.json(); if (data.result !== 'ok') { throw new APRSError(`APRS API error: ${data.result}`); } return data.entries.map(entry => ({ ...entry, timestamp: entry.timestamp * 1000, })); } catch (error) { if (error instanceof APRSError) { throw error; } if (error instanceof TypeError && error.message.includes('fetch')) { throw new APRSError('Network error: Unable to connect to APRS.fi API. Check your internet connection.'); } throw new APRSError(`Unexpected error: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
- index.ts:329-350 (registration)Tool registration in the ListTools response, defining name, description, and input schema.{ name: 'track_multiple_callsigns', description: 'Track multiple callsigns at once', inputSchema: { type: 'object', properties: { callsigns: { type: 'array', items: { type: 'string', }, description: 'Array of callsigns to track', }, apiKey: { type: 'string', description: 'APRS.fi API key (optional if set via /set-api-key)', }, }, required: ['callsigns'], }, }, {
- index.ts:332-348 (schema)Input schema defining required 'callsigns' array and optional 'apiKey'.inputSchema: { type: 'object', properties: { callsigns: { type: 'array', items: { type: 'string', }, description: 'Array of callsigns to track', }, apiKey: { type: 'string', description: 'APRS.fi API key (optional if set via /set-api-key)', }, }, required: ['callsigns'], },
- index.ts:409-421 (handler)Dispatch handler in CallToolRequestSchema switch that invokes getMultiplePositions and formats response as JSON text.case 'track_multiple_callsigns': const multiplePositions = await this.aprsService.getMultiplePositions( args.callsigns as string[], args.apiKey as string ); return { content: [ { type: 'text', text: JSON.stringify(multiplePositions, null, 2), }, ], };