Skip to main content
Glama
NU-AquaLab

The Aleph MCP

by NU-AquaLab

thealeph_asn_regex

Generate regex patterns to parse PTR records for a specific Autonomous System Number (ASN).

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. It takes the ASN parameter, calls the API client to fetch regex patterns, formats the response with markdown, and handles errors.
    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 for the tool, specifying that an 'asn' string parameter is required.
    inputSchema: { type: 'object', properties: { asn: { type: 'string', description: 'Autonomous System Number' } }, required: ['asn']
  • src/tools.js:98-110 (registration)
    Tool registration in getToolDefinitions(), including name, description, and input schema.
    { 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-241 (registration)
    Dispatch case in executeTool switch statement that routes to the asnRegex handler.
    case 'thealeph_asn_regex': return this.asnRegex(params);

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