Skip to main content
Glama
dhhuston

APRS.fi MCP Server

by dhhuston

get_aprs_position

Retrieve current position data for ham radio callsigns from APRS.fi to track locations and support balloon chase operations.

Instructions

Get current position data for a specific callsign from APRS.fi

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callsignYesThe callsign to look up (e.g., "W1AW")
apiKeyNoAPRS.fi API key (optional if set via /set-api-key)

Implementation Reference

  • index.ts:61-114 (handler)
    Core handler function that executes the get_aprs_position tool logic: validates inputs, calls APRS.fi API, parses response, and returns position data.
    async getPosition(callsign: 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 (!callsign?.trim()) {
        throw new APRSError('Callsign is required');
      }
    
      const params = new URLSearchParams({
        name: callsign.trim().toUpperCase(),
        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}`);
        }
    
        if (data.found === 0) {
          return [];
        }
    
        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:288-305 (registration)
    Registration of the get_aprs_position tool in the ListTools handler, defining name, description, and input schema.
    {
      name: 'get_aprs_position',
      description: 'Get current position data for a specific callsign from APRS.fi',
      inputSchema: {
        type: 'object',
        properties: {
          callsign: {
            type: 'string',
            description: 'The callsign to look up (e.g., "W1AW")',
          },
          apiKey: {
            type: 'string',
            description: 'APRS.fi API key (optional if set via /set-api-key)',
          },
        },
        required: ['callsign'],
      },
    },
  • MCP CallToolRequestSchema switch case handler that invokes the APRS service's getPosition method and returns the result as JSON text.
    case 'get_aprs_position':
      const positions = await this.aprsService.getPosition(
        args.callsign as string,
        args.apiKey as string
      );
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(positions, null, 2),
          },
        ],
      };
  • TypeScript interface defining the structure of APRS position data returned by the tool.
    interface APRSPosition {
      name: string;
      callsign: string;
      lat: number;
      lng: number;
      altitude?: number;
      timestamp: number;
      comment?: string;
      speed?: number;
      course?: number;
      symbol?: string;
      path?: string;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data but lacks details on rate limits, authentication requirements beyond the optional apiKey, error handling, or response format. This is insufficient for a tool that interacts with an external API.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and efficiently conveys the essential information, making it easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It does not explain what the return data includes (e.g., coordinates, timestamp), potential errors, or how the optional apiKey interacts with system settings. For a tool fetching real-time data from an external service, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the input schema already documents both parameters thoroughly. The description does not add any additional meaning or context beyond what the schema provides, such as examples of valid callsigns or apiKey usage scenarios.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('current position data for a specific callsign from APRS.fi'), making it immediately understandable. However, it does not explicitly differentiate from sibling tools like 'get_aprs_history' or 'track_multiple_callsigns', which might offer similar or overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools or contexts where other tools might be more appropriate, leaving the agent to infer usage based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/dhhuston/APRSFI-MCP-SERVER'

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