/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 8325647b37f6 */ import * as z from "zod"; import { transformationsCreateTransformation } from "../../funcs/transformationsCreateTransformation.js"; import { CreateRequest$zodSchema } from "../../models/createrequest.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { transformation: z.string().describe( "The valid transformation name to create.", ), create_request: CreateRequest$zodSchema.describe( `The named transformation definition.`, ), }; export const tool$transformationsCreateTransformation: ToolDefinition< typeof args > = { name: "create-transformation", description: `Creates a new named transformation by assigning a custom name to a set of transformation parameters Creates a new named transformation with the given name and transformation string. `, scopes: ["admin"], annotations: { "title": "Create Transformation", "destructiveHint": false, "idempotentHint": false, "openWorldHint": false, "readOnlyHint": false, }, args, tool: async (client, args, ctx) => { const [result] = await transformationsCreateTransformation( client, args.transformation, args.create_request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } return formatResult(result.value); }, };