Skip to main content
Glama
NU-AquaLab

The Aleph MCP

by NU-AquaLab

thealeph_asn_regex

Generate regex patterns for parsing PTR records from a specific Autonomous System Number (ASN) to analyze network infrastructure and DNS configurations.

Instructions

Get regex patterns associated with an ASN for PTR record parsing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asnYesAutonomous System Number

Implementation Reference

  • The main handler function for the 'thealeph_asn_regex' tool. Extracts ASN from params, calls the client API, formats the regex patterns response with markdown.
    async asnRegex(params) { try { const { asn } = params; const result = await this.client.getASNRegex(asn); let response = `🔍 Regex Patterns for ASN ${asn}\n\n`; if (typeof result === 'object' && Object.keys(result).length > 0) { for (const [key, value] of Object.entries(result)) { if (Array.isArray(value)) { response += `**${key}:**\n`; value.forEach((pattern, idx) => { response += ` ${idx + 1}. \`${pattern}\`\n`; }); } else { response += `**${key}:** \`${value}\`\n`; } } } else { response += 'No regex patterns available for this ASN.'; } return response; } catch (error) { return `❌ Failed to retrieve ASN regex patterns: ${error.message}`; } }
  • Input schema definition and tool metadata for 'thealeph_asn_regex' in the tool definitions array.
    { name: 'thealeph_asn_regex', description: 'Get regex patterns associated with an ASN for PTR record parsing', inputSchema: { type: 'object', properties: { asn: { type: 'string', description: 'Autonomous System Number' } }, required: ['asn'] }
  • src/tools.js:240-240 (registration)
    Registration/dispatch case in the executeTool switch statement that routes to the asnRegex handler.
    case 'thealeph_asn_regex':
  • API client helper method that makes the HTTP GET request to retrieve regex patterns for the given ASN.
    async getASNRegex(asn) { return this.makeRequest('GET', `/api/asn/${asn}/regex`); }

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