validate_aprs_key
Verify APRS.fi API key validity to ensure access to ham radio position tracking and balloon chase data.
Instructions
Test if an APRS.fi API key is valid
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apiKey | Yes | APRS.fi API key to validate |
Implementation Reference
- index.ts:231-257 (handler)Core handler function that validates an APRS.fi API key by performing a test API call to check if it returns 'ok'.
async validateApiKey(apiKey: string): Promise<boolean> { if (!apiKey) { return false; } try { const params = new URLSearchParams({ name: 'TEST', what: 'loc', apikey: apiKey, format: 'json' }); const response = await fetch(`${this.baseUrl}?${params}`); if (!response.ok) { return false; } const data: APRSResponse = await response.json(); return data.result === 'ok'; } catch { return false; } } - index.ts:423-434 (handler)MCP tool dispatcher case that invokes the validateApiKey method and formats the response.
case 'validate_aprs_key': const isValid = await this.aprsService.validateApiKey( args.apiKey as string ); return { content: [ { type: 'text', text: JSON.stringify({ valid: isValid }, null, 2), }, ], }; - index.ts:350-363 (schema)Tool registration including name, description, and input schema definition.
{ name: 'validate_aprs_key', description: 'Test if an APRS.fi API key is valid', inputSchema: { type: 'object', properties: { apiKey: { type: 'string', description: 'APRS.fi API key to validate', }, }, required: ['apiKey'], }, },