/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { agentConnectorsActivateAgentConnector } from "../../funcs/agentConnectorsActivateAgentConnector.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.ActivateAgentConnectorRequest$inboundSchema, }; export const tool$agentConnectorsActivateAgentConnector: ToolDefinition< typeof args > = { name: "agent-connectors-activate-agent-connector", description: `Activate a connector Revalidates the stored provider credentials and registers the provider webhook. Use this to retry a connector left in an error state. API-key authentication with every listed scope is required; session authentication is rejected, and the key must belong to the connector's original user or service-account principal so existing conversations keep the same owner.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await agentConnectorsActivateAgentConnector( 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); }, };