thealeph_asn_hint_mapping
Map Autonomous System Numbers to geographic locations using hint-based data for network analysis and intelligence gathering.
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 primary handler function that executes the 'thealeph_asn_hint_mapping' tool. Extracts ASN from params, fetches data via client.getASNHintMapping, and formats the result as a structured markdown response listing locations.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:140-153 (schema)Tool schema definition including name, description, and input validation requiring 'asn' as a string.{ 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)Switch case in executeTool method that registers and dispatches to the asnHintMapping handler for this tool name.case 'thealeph_asn_hint_mapping': return this.asnHintMapping(params);
- src/client.js:136-141 (helper)Supporting API client method that performs the actual HTTP request to retrieve ASN hint mapping data from the Aleph API./** * Get hint mapping by ASN */ async getASNHintMapping(asn) { return this.makeRequest('GET', `/api/asn/${asn}/hint_mapping`); }