@salesforce/agents
    Preparing search index...

    Class McpAgentScript

    Client for the Core Connect API that returns the Agent Script for MCP tools, the same blocks the Agent Builder writes.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • POST /connect/genai-mcp/agent-script/actions. Returns the Agent Script action block and reasoning reference per MCP tool id, in request order. Not read-only: like Agent Builder, the call also assigns the MCP runtime permissions for the tools. Uses the connection API version, or 68.0 when that is lower.

      Parameters

      • connection: Connection
      • toolIds: string[]

      Returns Promise<McpAgentScriptActionsOutput>