set_hosting
Configure website hosting for a domain using Dynadot's built-in hosting service. Select between basic or advanced hosting types and enable mobile-optimized views.
Instructions
Set website hosting for a domain using Dynadot's built-in hosting service.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name to configure hosting for | |
| hosting_type | Yes | Hosting type: 'advanced' or 'basic' | |
| mobile_view | No | Enable mobile-optimized view (advanced hosting only) |
Implementation Reference
- src/services/dynadot-client.ts:380-384 (handler)The service method that performs the actual API call for 'set_hosting'.
async setHosting(domain: string, hostingType: string, mobileViewOn?: boolean): Promise<DynadotResponse> { const params: Record<string, string> = { domain, hosting_type: hostingType }; if (mobileViewOn !== undefined) params.mobile_view_on = mobileViewOn ? "1" : "0"; return this.call("set_hosting", params); } - src/tools/settings.ts:294-320 (registration)MCP tool registration and request handler for 'set_hosting'.
server.tool( "set_hosting", "Set website hosting for a domain using Dynadot's built-in hosting service.", { domain: z.string().describe("Domain name to configure hosting for"), hosting_type: z .enum(["advanced", "basic"]) .describe("Hosting type: 'advanced' or 'basic'"), mobile_view: z .boolean() .optional() .describe("Enable mobile-optimized view (advanced hosting only)"), }, async ({ domain, hosting_type, mobile_view }) => { try { const result = await client.setHosting(domain, hosting_type, mobile_view); return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2) }, ], }; } catch (error) { const msg = error instanceof Error ? error.message : String(error); return { content: [ { type: "text" as const, text: `Failed to set hosting: ${msg}` }, ],