Skip to main content
Glama
NU-AquaLab

The Aleph MCP

by NU-AquaLab

thealeph_asn_classifications

Retrieve classification details for Autonomous System Numbers to analyze network infrastructure and identify organizational ownership.

Instructions

Get classification information for a specific ASN

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asnYesAutonomous System Number (e.g., "15169" for Google)

Implementation Reference

  • Main handler function that executes the 'thealeph_asn_classifications' tool logic, extracts ASN parameter, calls the API client, and formats the classifications response.
    async asnClassifications(params) { try { const { asn } = params; const result = await this.client.getASNClassifications(asn); let response = `🏷️ Classifications for ASN ${asn}\n\n`; if (typeof result === 'object' && Object.keys(result).length > 0) { for (const [key, value] of Object.entries(result)) { response += `**${key}:** ${JSON.stringify(value, null, 2)}\n`; } } else { response += 'No classification data available for this ASN.'; } return response; } catch (error) { return `❌ Failed to retrieve ASN classifications: ${error.message}`; } }
  • Tool schema definition including name, description, and input schema requiring 'asn' as a string.
    { name: 'thealeph_asn_classifications', description: 'Get classification information for a specific ASN', inputSchema: { type: 'object', properties: { asn: { type: 'string', description: 'Autonomous System Number (e.g., "15169" for Google)' } }, required: ['asn'] } },
  • src/tools.js:238-239 (registration)
    Registration of the tool handler in the executeTool switch statement dispatcher.
    case 'thealeph_asn_classifications': return this.asnClassifications(params);
  • Core API handler in the client that performs the HTTP GET request to retrieve ASN classifications from the Aleph API.
    async getASNClassifications(asn) { return this.makeRequest('GET', `/api/asn/${asn}/classifications`); }
  • Helper method used by all API calls, including getASNClassifications, providing HTTP request execution with retry logic and error handling.
    async makeRequest(method, endpoint, options = {}) { for (let attempt = 1; attempt <= this.retryAttempts; attempt++) { try { const response = await this.axios.request({ method, url: endpoint, ...options }); return response.data; } catch (error) { if (attempt === this.retryAttempts) { throw error; } // Wait before retry (exponential backoff) await new Promise(resolve => setTimeout(resolve, this.retryDelay * Math.pow(2, attempt - 1)) ); } } }

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