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
| Name | Required | Description | Default |
|---|---|---|---|
| asn | Yes | Autonomous System Number |
Implementation Reference
- src/tools.js:493-517 (handler)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}`; } }
- src/tools.js:143-152 (schema)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);
- src/client.js:139-141 (helper)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`); }