/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { guardrailsGetGuardrails } from "../../funcs/guardrailsGetGuardrails.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.GetGuardrailsRequest$inboundSchema, }; export const tool$guardrailsGetGuardrails: ToolDefinition = { name: "guardrails-get-guardrails", description: `Get effective guardrails Retrieve the guardrails that apply to the caller's requests: the org-wide policy plus the caller's team policy, combined. Both are enforced when both exist. Policies are managed by org admins via PUT /guardrails.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await guardrailsGetGuardrails( 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); }, };