/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { guardrailsListGuardrailsPolicies } from "../../funcs/guardrailsListGuardrailsPolicies.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.ListGuardrailsPoliciesRequest$inboundSchema, }; export const tool$guardrailsListGuardrailsPolicies: ToolDefinition< typeof args > = { name: "guardrails-list-guardrails-policies", description: `List guardrails policies List the stored guardrails policies visible to the caller: org admins see every policy in their org (the org-wide policy has team_id null, plus each team's additional policy); other callers see the org-wide policy and their own team's policy. Unlike GET /guardrails, rows are returned per scope so a team can see which rules it owns versus which the org mandates.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await guardrailsListGuardrailsPolicies( 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); }, };