/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { uploadPresetsListUploadPresets } from "../../funcs/uploadPresetsListUploadPresets.js";
import * as operations from "../../models/operations/index.js";
import { formatResult } from "../tools.js";
const args = {
    orderBy: operations.OrderBy$inboundSchema.optional(),
    direction: operations.Direction$inboundSchema.optional(),
    nextCursor: z.number().int().optional(),
};
export const tool$uploadPresetsListUploadPresets = {
    name: "list-upload-presets",
    description: `Lists all upload presets configured in the account`,
    scopes: ["builder"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await uploadPresetsListUploadPresets(client, args.orderBy, args.direction, args.nextCursor, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        const value = result.value;
        return formatResult(value, apiCall);
    },
};
//# sourceMappingURL=uploadPresetsListUploadPresets.js.map