create_folder
Create a new folder to organize domains in your Dynadot account by specifying a folder name.
Instructions
Create a new folder for organizing domains.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_name | Yes | Name for the new folder |
Implementation Reference
- src/tools/folder.ts:27-44 (handler)The handler implementation for the create_folder MCP tool, which calls the dynadot-client service.
async ({ folder_name }) => { try { const result = await client.createFolder(folder_name); 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 create folder: ${msg}` }, ], isError: true, }; } } - src/tools/folder.ts:21-45 (registration)Registration of the create_folder tool within the MCP server.
server.tool( "create_folder", "Create a new folder for organizing domains.", { folder_name: z.string().describe("Name for the new folder"), }, async ({ folder_name }) => { try { const result = await client.createFolder(folder_name); 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 create folder: ${msg}` }, ], isError: true, }; } } ); - Service method that makes the actual API call to the Dynadot service for creating a folder.
async createFolder(folderName: string): Promise<DynadotResponse> { return this.call("create_folder", { folder_name: folderName }); }