Skip to main content
Glama
NU-AquaLab

The Aleph MCP

by NU-AquaLab

thealeph_asn_hint_mapping

Map Autonomous System Numbers to geographic locations using hint-based data for network analysis and intelligence.

Instructions

Get hint-based location mapping for an ASN

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asnYesAutonomous System Number

Implementation Reference

  • The main handler function that destructures the ASN parameter, calls the client to fetch hint mapping data, formats it into a structured markdown response listing locations, and handles errors.
    async asnHintMapping(params) {
      try {
        const { asn } = params;
        const result = await this.client.getASNHintMapping(asn);
    
        let response = `🌍 Hint-Based Location Mapping for ASN ${asn}\n\n`;
    
        if (Array.isArray(result) && result.length > 0) {
          result.forEach((location, idx) => {
            response += `**Location ${idx + 1}:**\n`;
            for (const [key, value] of Object.entries(location)) {
              response += `  - ${key}: ${value}\n`;
            }
            response += '\n';
          });
        } else {
          response += 'No hint mapping available for this ASN.';
        }
    
        return response;
    
      } catch (error) {
        return `❌ Failed to retrieve hint mapping: ${error.message}`;
      }
    }
  • Input schema defining the expected parameters for the tool: an object with a required 'asn' string field.
    inputSchema: {
      type: 'object',
      properties: {
        asn: {
          type: 'string',
          description: 'Autonomous System Number'
        }
      },
      required: ['asn']
    }
  • src/tools.js:140-153 (registration)
    Tool definition object in the getToolDefinitions() array, registering the tool name, description, and input schema for MCP.
    {
      name: 'thealeph_asn_hint_mapping',
      description: 'Get hint-based location mapping for an ASN',
      inputSchema: {
        type: 'object',
        properties: {
          asn: {
            type: 'string',
            description: 'Autonomous System Number'
          }
        },
        required: ['asn']
      }
    },
  • src/tools.js:246-247 (registration)
    Dispatch case in executeTool() switch statement that maps the tool name to the asnHintMapping handler.
    case 'thealeph_asn_hint_mapping':
      return this.asnHintMapping(params);
  • API client method that performs the HTTP GET request to the /api/asn/{asn}/hint_mapping endpoint using the makeRequest helper.
    async getASNHintMapping(asn) {
      return this.makeRequest('GET', `/api/asn/${asn}/hint_mapping`);
    }

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/NU-AquaLab/thealeph-mcp'

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