/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 1c8ec47f5378 */ import * as z from "zod"; import { uploadPresetsDeleteUploadPreset } from "../../funcs/uploadPresetsDeleteUploadPreset.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { name: z.string().describe("The name of the upload preset."), }; export const tool$uploadPresetsDeleteUploadPreset: ToolDefinition = { name: "delete-upload-preset", description: `Deletes an upload preset from the account`, scopes: ["builder"], annotations: { "title": "Delete Upload Preset", "destructiveHint": true, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": false, }, args, tool: async (client, args, ctx) => { const [result] = await uploadPresetsDeleteUploadPreset( client, args.name, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } return formatResult(result.value); }, };