/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 841868a185b7 */ import { triggersCreateTrigger } from "../../funcs/triggersCreateTrigger.js"; import { CreateTriggerRequest$zodSchema } from "../../models/createtriggerrequest.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: CreateTriggerRequest$zodSchema.describe( `The webhook notification trigger to create.`, ), }; export const tool$triggersCreateTrigger: ToolDefinition = { name: "create-trigger", description: `Creates a new notification trigger (webhook) by specifying an event type and a destination Creates a new trigger. Your product environment supports triggers up to a maximum determined by multiplying the number of unique event types by the limit of 30 notification URLs. `, scopes: ["admin"], annotations: { "title": "Create Trigger", "destructiveHint": false, "idempotentHint": false, "openWorldHint": false, "readOnlyHint": false, }, args, tool: async (client, args, ctx) => { const [result] = await triggersCreateTrigger( client, args.request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } return formatResult(result.value); }, };