/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { guardrailsUpdateGuardrails } from "../../funcs/guardrailsUpdateGuardrails.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.UpdateGuardrailsRequest$inboundSchema, }; export const tool$guardrailsUpdateGuardrails: ToolDefinition = { name: "guardrails-update-guardrails", description: `Update guardrails policy Replace a guardrails policy. Omit team_id to set the org-wide policy (org admin only); provide team_id to set that team's additional policy (org admins may target any team in their org, other callers only their own team). The org-wide policy applies to every team; a team policy is enforced in addition to it — configuring a team policy never weakens the org-wide one.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await guardrailsUpdateGuardrails( client, args.request, { 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); }, };