Skip to main content
Glama
NU-AquaLab

The Aleph MCP

by NU-AquaLab

thealeph_query_ptr

Query PTR records to retrieve network intelligence including ASN, location, and geo hints for IP addresses or hostnames.

Instructions

Query reverse DNS (PTR) records and retrieve network intelligence including ASN, location, and geo hints

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ptr_recordNoPTR record hostname to query
ipNoIP address to query
asnNoASN number to query

Implementation Reference

  • The main handler function that processes input parameters, validates them, calls the API client, and formats the response with PTR query results including ASN, location, regex, and geo hints.
    async queryPTR(params) { try { const { ptr_record, ip, asn } = params; if (!ptr_record && !ip && !asn) { return '❌ Please provide at least one of: ptr_record, ip, or asn'; } const result = await this.client.queryPTR(ptr_record, ip, asn); let response = '🔎 PTR Query Results\n\n'; if (result.ptr_record) { response += `**PTR Record:** ${result.ptr_record}\n`; } if (result.ip) { response += `**IP Address:** ${result.ip}\n`; } if (result.asn) { response += `**ASN:** ${result.asn}\n`; } if (result.location_info) { response += `**Location Info:** ${JSON.stringify(result.location_info, null, 2)}\n`; } if (result.regular_expression) { response += `**Regex Pattern:** \`${result.regular_expression}\`\n`; } if (result.geo_hint) { response += `**Geo Hint:** ${JSON.stringify(result.geo_hint, null, 2)}\n`; } return response; } catch (error) { return `❌ PTR query failed: ${error.message}`; } }
  • The tool definition including name, description, and input schema specifying optional parameters ptr_record (string), ip (string), asn (integer).
    { name: 'thealeph_query_ptr', description: 'Query reverse DNS (PTR) records and retrieve network intelligence including ASN, location, and geo hints', inputSchema: { type: 'object', properties: { ptr_record: { type: 'string', description: 'PTR record hostname to query' }, ip: { type: 'string', description: 'IP address to query' }, asn: { type: 'integer', description: 'ASN number to query' } }, required: [] } },
  • src/tools.js:248-249 (registration)
    The switch case in executeTool method that registers and dispatches the 'thealeph_query_ptr' tool call to its handler.
    case 'thealeph_query_ptr': return this.queryPTR(params);
  • Supporting API client method that constructs the request payload and makes the HTTP POST to /api/query endpoint for PTR querying.
    async queryPTR(ptrRecord = null, ip = null, asn = null) { const data = {}; if (ptrRecord) data.ptr_record = ptrRecord; if (ip) data.ip = ip; if (asn) data.asn = asn; return this.makeRequest('POST', '/api/query', { data }); }

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