/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 86830305f9cf */ import * as z from "zod"; import { transformationsListTransformations } from "../../funcs/transformationsListTransformations.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { named: z.boolean().describe( "Whether to return only named (`true`) or unnamed (`false`) transformations. If this parameter isn't included, both named and unnamed transformations will be returned.", ).optional(), max_results: z.int().default(10).describe( "The maximum number of results to return. Default is 10.", ), next_cursor: z.string().describe( "The cursor for pagination. Use the next_cursor value from a previous response to get the next page of results.", ).optional(), }; export const tool$transformationsListTransformations: ToolDefinition< typeof args > = { 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"], annotations: { "title": "List Transformations", "destructiveHint": false, "idempotentHint": true, "openWorldHint": false, "readOnlyHint": true, }, args, tool: async (client, args, ctx) => { const [result] = await transformationsListTransformations( client, args.named, args.max_results, args.next_cursor, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } return formatResult(result.value); }, };