suggest_domains
Generate available domain name suggestions based on keywords, checking multiple TLDs and variations to help find suitable web addresses for projects or businesses.
Instructions
Suggest available domain names based on a keyword or phrase. Checks multiple variations and TLDs.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | The keyword or phrase to base suggestions on | |
| category | No | Category of TLDs to check. Default: general | |
| includeVariations | No | Include variations like adding 'app', 'hq', 'get' prefixes/suffixes. Default: true |
Implementation Reference
- src/index.ts:201-245 (handler)The main handler for the 'suggest_domains' tool. It accepts a keyword parameter, optionally generates variations (e.g., adding 'app', 'hq' prefixes/suffixes), gets TLDs based on category, checks all combinations using checkAlternativeTlds, filters available domains, and returns a sorted summary by confidence and domain length.case "suggest_domains": { const keyword = args?.keyword as string; if (!keyword) { throw new Error("Keyword is required"); } const category = (args?.category as string) || "general"; const includeVariations = args?.includeVariations !== false; const names = includeVariations ? generateVariations(keyword) : [keyword]; const tlds = getSuggestedTlds(category as "general" | "tech" | "country" | "all"); // Check all combinations const allResults: DomainCheckResult[] = []; for (const name of names) { const results = await checkAlternativeTlds(name, tlds.slice(0, 5), { concurrency: 3 }); allResults.push(...results.results); } const available = allResults.filter((r) => r.available); const summary = { keyword, variationsChecked: names, totalChecked: allResults.length, availableCount: available.length, suggestions: available.sort((a, b) => { // Sort by confidence then by domain length if (a.confidence !== b.confidence) { const order = { high: 0, medium: 1, low: 2 }; return order[a.confidence] - order[b.confidence]; } return a.domain.length - b.domain.length; }), }; return { content: [ { type: "text", text: JSON.stringify(summary, null, 2), }, ], }; }
- src/index.ts:65-89 (registration)Tool registration and schema definition for 'suggest_domains'. Defines the tool's name, description, and inputSchema with properties: keyword (required), category (enum: general/tech/country/all), and includeVariations (boolean, default true).{ name: "suggest_domains", description: "Suggest available domain names based on a keyword or phrase. Checks multiple variations and TLDs.", inputSchema: { type: "object" as const, properties: { keyword: { type: "string", description: "The keyword or phrase to base suggestions on", }, category: { type: "string", enum: ["general", "tech", "country", "all"], description: "Category of TLDs to check. Default: general", }, includeVariations: { type: "boolean", description: "Include variations like adding 'app', 'hq', 'get' prefixes/suffixes. Default: true", }, }, required: ["keyword"], }, },
- src/index.ts:107-120 (helper)Helper function generateVariations that creates domain name variations from a keyword. Adds common prefixes (get, try, use, my, the, go) and suffixes (app, hq, io, hub, labs, now) to suggest alternative domain names.function generateVariations(keyword: string): string[] { const base = keyword.toLowerCase().replace(/[^a-z0-9]/g, ""); const variations = [base]; // Common prefixes const prefixes = ["get", "try", "use", "my", "the", "go"]; // Common suffixes const suffixes = ["app", "hq", "io", "hub", "labs", "now"]; prefixes.forEach((p) => variations.push(`${p}${base}`)); suffixes.forEach((s) => variations.push(`${base}${s}`)); return [...new Set(variations)]; }
- src/domain-checker.ts:281-309 (helper)checkAlternativeTlds function that checks domain availability across multiple TLDs. Processes domains in configurable batches to avoid overwhelming servers and returns all check results. Used by suggest_domains to check multiple TLDs for each generated variation.export async function checkAlternativeTlds( domainName: string, tlds: string[] = POPULAR_TLDS, options: { concurrency?: number; batchDelay?: number } = {} ): Promise<AlternativeTldResult> { const { concurrency = DEFAULT_CONCURRENCY, batchDelay = BATCH_DELAY_MS } = options; const name = domainName.includes(".") ? parseDomain(domainName).name : domainName; const results: DomainCheckResult[] = []; // Process in batches to avoid overwhelming servers for (let i = 0; i < tlds.length; i += concurrency) { const batch = tlds.slice(i, i + concurrency); const batchResults = await Promise.all( batch.map((tld) => checkDomain(`${name}.${tld}`)) ); results.push(...batchResults); // Add delay between batches (except after the last batch) if (i + concurrency < tlds.length) { await sleep(batchDelay); } } return { originalDomain: name, results, }; }
- src/domain-checker.ts:314-328 (helper)getSuggestedTlds function that returns TLD arrays based on category (general, tech, country, or all). Provides the appropriate TLD list for the suggest_domains tool to check against.export function getSuggestedTlds( purpose: "general" | "tech" | "country" | "all" = "general" ): string[] { switch (purpose) { case "tech": return TECH_TLDS; case "country": return COUNTRY_TLDS; case "all": return [...new Set([...POPULAR_TLDS, ...TECH_TLDS, ...COUNTRY_TLDS])]; case "general": default: return POPULAR_TLDS; } }