/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: f2f3e3d10f66 */ import * as z from "zod"; import { uploadPresetsGetUploadPreset } from "../../funcs/uploadPresetsGetUploadPreset.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { name: z.string().describe("The name of the upload preset."), }; export const tool$uploadPresetsGetUploadPreset: ToolDefinition = { name: "get-upload-preset-details", description: `Retrieves details of a single upload preset`, scopes: ["builder"], annotations: { "title": "Get Upload Preset Details", "destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true, }, args, tool: async (client, args, ctx) => { const [result] = await uploadPresetsGetUploadPreset( 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); }, };