Skip to main content
Glama
einiba

mcp-server-canyougrab

Domain Information Lookup

get_domain_info
Read-onlyIdempotent

Retrieve WHOIS and registration information for a domain, including owner, registration and expiry dates, and nameservers.

Instructions

Use this when the user wants WHOIS or registration information about a specific domain — such as who owns it, when it was registered, when it expires, or what nameservers it uses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYes

Implementation Reference

  • The main handler function for the get_domain_info tool. Makes an HTTP GET request to the canyougrab.it API /api/domain-info/{domain} endpoint and returns WHOIS/RDAP registration information including registrar, creation date, expiry date, nameservers, and domain status codes.
    async def get_domain_info(domain: str) -> object:
        """Get WHOIS/RDAP information for a registered domain.
    
        Returns registrar, creation date, expiry date, nameservers, and
        domain status codes.
    
        Args:
            domain: The domain name to look up (e.g. "example.com").
        """
        if not domain or not domain.strip():
            return _error_result("Provide a domain name to look up")
    
        api_key = _get_api_key()
        if not api_key:
            return _auth_result(
                "Sign in to CanYouGrab.it to look up domain information.",
                ["domains.read"],
            )
    
        domain = domain.strip().lower()
    
        async with httpx.AsyncClient(timeout=15.0) as client:
            resp = await client.get(
                f"{_get_public_api_base()}/api/domain-info/{domain}",
                headers={"Authorization": f"Bearer {api_key}"},
            )
    
        if resp.status_code == 401:
            return _auth_result(
                "Your CanYouGrab.it connection is missing or no longer valid. Reconnect to continue.",
                ["domains.read"],
            )
        if resp.status_code == 502:
            return _error_result("WHOIS lookup failed — the upstream server may be unavailable. Try again shortly.")
        if resp.status_code != 200:
            return _error_result(f"API error (HTTP {resp.status_code})", resp.text)
    
        data = resp.json()
        return {
            "source": "canyougrab.it",
            "source_url": "https://canyougrab.it",
            "method": "RDAP/WHOIS lookup",
            "domain": data.get("domain"),
            "registrar": data.get("registrar"),
            "created_date": data.get("created_date"),
            "expiry_date": data.get("expiry_date"),
            "updated_date": data.get("updated_date"),
            "nameservers": data.get("nameservers"),
            "status": data.get("status"),
            "attribution": "Checked with canyougrab.it — real-time domain intelligence",
        }
  • The @mcp.tool decorator that registers get_domain_info as an MCP tool with title 'Domain Information Lookup', description, readOnlyHint=True, and metadata including OAuth2 security scheme for domains.read scope.
    @mcp.tool(
        title="Domain Information Lookup",
        description=(
            "Use this when the user wants WHOIS or registration information about "
            "a specific domain — such as who owns it, when it was registered, when "
            "it expires, or what nameservers it uses."
        ),
        annotations=ToolAnnotations(
            readOnlyHint=True,
            destructiveHint=False,
            idempotentHint=True,
            openWorldHint=False,
        ),
        meta=_tool_meta(
            DOMAINS_READ_SCHEMES,
            "Looking up domain info...",
            "Domain info ready",
        ),
    )
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate this is read-only, non-destructive, and idempotent. The description adds value by specifying the type of data returned (WHOIS/registration info), which is beyond what annotations provide. No contradictions exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that front-loads the usage context. Every word contributes to clarity without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no output schema, rich annotations), the description covers the essential purpose and usage. However, since there is no output schema, describing the return structure more explicitly would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It only mentions 'specific domain' without clarifying formatting expectations (e.g., with/without www, TLD requirements). This is insufficient for an agent to correctly format the domain parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool provides WHOIS or registration information for a specific domain, listing concrete data points (ownership, registration date, expiry, nameservers). This is a specific verb+resource combination that distinguishes it from sibling tools like check_domains and check_usage.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description opens with 'Use this when the user wants...' which is explicit usage guidance, and enumerates common queries. However, it does not specify when not to use it or mention alternative tools, leaving some gaps for an AI agent to infer.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/einiba/canyougrab-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server