/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { transformationsListTransformations } from "../../funcs/transformationsListTransformations.js";
import { formatResult } from "../tools.js";
const args = {
    named: z.boolean().optional(),
    maxResults: z.number().int().default(10),
    nextCursor: z.string().optional(),
};
export const tool$transformationsListTransformations = {
    name: "list-transformations",
    description: `Lists all transformation definitions in your account (including named transformations

Retrieves a list of all transformations, which can be filtered to show either only named or unnamed transformations.
`,
    scopes: ["admin"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await transformationsListTransformations(client, args.named, args.maxResults, 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=transformationsListTransformations.js.map