Skip to main content
Glama

domain_check

Check domain availability for deployment on Railway.app. Validate domain names before use to ensure they're ready for your infrastructure projects.

Instructions

[API] Check if a domain is available for use

⚡️ Best for: ✓ Validating domain availability ✓ Pre-deployment checks ✓ Domain planning

→ Next steps: domain_create

→ Related: domain_list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to check availability for

Implementation Reference

  • The handler function for the 'domain_check' tool. It takes a domain name and delegates to domainService.checkDomainAvailability.
    async ({ domain }) => { return domainService.checkDomainAvailability(domain); }
  • Zod input schema defining the 'domain' parameter for the domain_check tool.
    { domain: z.string().describe("Domain name to check availability for") },
  • Registration of the 'domain_check' tool using createTool, including description, schema, and handler.
    createTool( "domain_check", formatToolDescription({ type: 'API', description: "Check if a domain is available for use", bestFor: [ "Validating domain availability", "Pre-deployment checks", "Domain planning" ], relations: { nextSteps: ["domain_create"], related: ["domain_list"] } }), { domain: z.string().describe("Domain name to check availability for") }, async ({ domain }) => { return domainService.checkDomainAvailability(domain); } ),
  • Core implementation in DomainService that checks domain availability via client API and formats the response.
    async checkDomainAvailability(domain: string): Promise<CallToolResult> { try { const result = await this.client.domains.serviceDomainAvailable(domain); if (result.available) { return createSuccessResponse({ text: `Domain ${domain} is available`, data: result }); } else { return createSuccessResponse({ text: `Domain ${domain} is not available: ${result.message}`, data: result }); } } catch (error) { return createErrorResponse(`Error checking domain availability: ${formatError(error)}`); } }

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/epitaphe360/railway-mcp'

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