/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 10b30e9d4a77 */ import * as z from "zod"; import { foldersUpdateFolder } from "../../funcs/foldersUpdateFolder.js"; import { MoveFolderRequest$zodSchema } from "../../models/movefolderrequest.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { folder: z.string().describe( "The full path of the folder, including any nested folders. Must not be empty, and must not contain double slashes or leading/trailing slashes.", ), move_folder_request: MoveFolderRequest$zodSchema.describe( `The new folder path.`, ), }; export const tool$foldersUpdateFolder: ToolDefinition = { name: "move-folder", description: `Renames or moves an entire folder (along with all assets it contains) to a new location Renames or moves an entire folder (along with all assets it contains) to a new location within your Cloudinary media library.`, scopes: ["librarian"], annotations: { "title": "Move Folder", "destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": false, }, args, tool: async (client, args, ctx) => { const [result] = await foldersUpdateFolder( client, args.folder, args.move_folder_request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } return formatResult(result.value); }, };