Skip to main content
Glama
imprvhub

Domain Availability Checker MCP

check_domain

Verify domain availability and explore alternatives. Check exact domains or search across popular TLDs with clear, actionable results. Ideal for finding and securing the right web address.

Instructions

Check domain availability. 

Usage examples:
- "mysite.com --domain" - checks exact domain
- "mysite --domain" - checks mysite across all popular TLDs
- "test.io --domain" - checks test.io exactly, plus test across all TLDs

Args:
    domain_query (str): Domain to check with --domain flag
    
Returns:
    Dict containing availability results for the domain and suggested alternatives

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domain_queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main MCP tool handler for 'check_domain', decorated with @mcp.tool(). It parses the domain_query, validates input, and delegates to run_domain_checks for availability checking.
    @mcp.tool()
    async def check_domain(domain_query: str) -> Dict:
        if '--domain' not in domain_query:
            return {
                "error": "Please use --domain flag. Example: 'mysite.com --domain' or 'mysite --domain'"
            }
        
        domain_part = domain_query.replace('--domain', '').strip()
        
        if not domain_part:
            return {
                "error": "Please provide a domain name. Example: 'mysite.com --domain'"
            }
        
        base_name, existing_tld = extract_domain_parts(domain_part)
        
        if not base_name:
            return {
                "error": "Invalid domain format. Example: 'mysite.com --domain'"
            }
        
        try:
            return await run_domain_checks(domain_part)
        except Exception as e:
            return {
                "error": f"Failed to check domain: {str(e)}"
            }
  • Core helper function that performs comprehensive domain availability checks for the input base name across multiple TLDs, categorizing results into available, unavailable, and invalid.
    async def run_domain_checks(domain_part: str) -> Dict:
        base_name, existing_tld = extract_domain_parts(domain_part)
        
        results = {
            "requested_domain": None,
            "available_domains": [],
            "unavailable_domains": [],
            "invalid_domains": [],
            "total_checked": 0,
            "check_summary": {}
        }
        
        invalid_for_tlds = []
        for tld in ALL_TLDS:
            if not is_valid_domain_name(base_name, tld):
                min_length = get_min_length_for_tld(tld)
                invalid_for_tlds.append({
                    'tld': tld,
                    'reason': f'Minimum length: {min_length} chars'
                })
        
        if invalid_for_tlds:
            results["invalid_domains"] = {
                'base_name': base_name,
                'length': len(base_name),
                'invalid_for': invalid_for_tlds[:10]
            }
        
        if existing_tld:
            exact_result = await check_domain_availability(f"{base_name}.{existing_tld}")
            results["requested_domain"] = exact_result
            
            other_tlds = [tld for tld in ALL_TLDS if tld != existing_tld]
            all_results = await check_multiple_domains(base_name, other_tlds)
            if exact_result.get('valid', True):
                all_results.append(exact_result)
        else:
            all_results = await check_multiple_domains(base_name, ALL_TLDS)
        
        for result in all_results:
            if result.get('available'):
                results["available_domains"].append(result)
            else:
                results["unavailable_domains"].append(result)
        
        results["total_checked"] = len(all_results)
        results["available_domains"].sort(key=lambda x: x['domain'])
        results["unavailable_domains"].sort(key=lambda x: x['domain'])
        
        popular_available = [r for r in results["available_domains"] 
                           if any(r['domain'].endswith(f'.{tld}') for tld in POPULAR_TLDS)]
        
        results["check_summary"] = {
            "total_available": len(results["available_domains"]),
            "total_unavailable": len(results["unavailable_domains"]),
            "total_invalid": len(invalid_for_tlds),
            "popular_available": len(popular_available),
            "country_available": len([r for r in results["available_domains"] 
                                    if any(r['domain'].endswith(f'.{tld}') for tld in COUNTRY_TLDS)]),
            "new_tlds_available": len([r for r in results["available_domains"] 
                                     if any(r['domain'].endswith(f'.{tld}') for tld in NEW_TLDS)])
        }
        
        return results
  • Helper function to check availability of a single domain using DNS, WHOIS (fallback to socket), and socket checks, returning detailed availability status.
    async def check_domain_availability(domain: str) -> Dict:
        start_time = time.time()
        
        base_name, tld = extract_domain_parts(domain)
        
        if not is_valid_domain_name(base_name, tld):
            return {
                'domain': domain,
                'available': False,
                'error': f'Invalid domain: "{base_name}" does not meet requirements for .{tld} (min length: {get_min_length_for_tld(tld)})',
                'valid': False,
                'check_time': "0s"
            }
        
        dns_available = await check_domain_dns(domain)
        whois_available = await check_domain_whois(domain)
        
        is_available = dns_available and whois_available
        
        end_time = time.time()
        check_time = round(end_time - start_time, 2)
        
        return {
            'domain': domain,
            'available': is_available,
            'dns_available': dns_available,
            'whois_available': whois_available,
            'valid': True,
            'check_time': f"{check_time}s"
        }
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes what the tool does (checks availability, returns results and alternatives) and provides usage examples that clarify behavior with different input formats. However, it doesn't mention rate limits, authentication needs, or error conditions.

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 well-structured with clear sections (purpose statement, usage examples, args, returns) and every sentence adds value. It's appropriately sized for a single-parameter tool with complex behavior, avoiding unnecessary verbosity while being comprehensive.

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

Completeness5/5

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

Given the tool's moderate complexity (domain checking with TLD variations), no annotations, and an output schema present, the description provides excellent context. It explains the tool's behavior, parameter usage, and return format, making it complete enough for effective use without needing to reference the output schema for basic understanding.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must fully compensate. It successfully explains the single parameter's purpose ('Domain to check'), provides multiple usage examples showing how different inputs affect behavior, and clarifies the --domain flag context, adding significant value beyond the bare schema.

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's purpose with a specific verb ('Check') and resource ('domain availability'), making it immediately understandable. It distinguishes this as a domain checking tool, which is unambiguous even without sibling tools for comparison.

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

Usage Guidelines3/5

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

The description provides usage examples that imply when to use the tool (for domain availability checks), but it doesn't explicitly state when NOT to use it or mention alternatives. Without sibling tools, this is less critical, but the guidance remains implicit rather than explicit.

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

Related 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/imprvhub/mcp-domain-availability'

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