UNPKG

whodis-mcp-server

Version:

Whodis MCP Server for checking the availability of domain names using WHOIS lookups.

24 lines (23 loc) 1.35 kB
import { ControllerResponse } from '../types/common.types.js'; import { GetIpOptions } from './ipaddress.types.js'; /** * @namespace IpAddressController * @description Controller responsible for handling IP address lookup logic. * It orchestrates calls to the ip-api.com service, applies defaults, * maps options, and formats the response using the formatter. */ /** * @function get * @description Fetches details for a specific IP address or the current device's IP. * Handles mapping controller options (like includeExtendedData) to service parameters (fields). * @memberof IpAddressController * @param {string} [ipAddress] - Optional IP address to look up. If omitted, the service will fetch the current device's public IP. * @param {GetIpOptions} [options={}] - Optional configuration for the request, such as `includeExtendedData` and `useHttps`. * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response containing the formatted IP details in Markdown. * @throws {McpError} Throws an McpError (handled by `handleControllerError`) if the service call fails or returns an error. */ declare function get(ipAddress?: string, options?: GetIpOptions): Promise<ControllerResponse>; declare const _default: { get: typeof get; }; export default _default;