ภาษา

AgentToolboxes.InvokeLatestToolboxMcpAsync Method

Definition

Overloads

Name Description
InvokeLatestToolboxMcpAsync(String, BinaryContent, String, RequestOptions)

[Protocol Method] Invokes the latest version of the specified toolbox through its MCP endpoint.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
InvokeLatestToolboxMcpAsync(String, IDictionary<String,BinaryData>, String, CancellationToken)

Invokes the latest version of the specified toolbox through its MCP endpoint.

InvokeLatestToolboxMcpAsync(String, BinaryContent, String, RequestOptions)

Source:
AgentToolboxes.cs

[Protocol Method] Invokes the latest version of the specified toolbox through its MCP endpoint.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult> InvokeLatestToolboxMcpAsync(string name, System.ClientModel.BinaryContent content, string contentType, System.ClientModel.Primitives.RequestOptions options = default);
abstract member InvokeLatestToolboxMcpAsync : string * System.ClientModel.BinaryContent * string * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
override this.InvokeLatestToolboxMcpAsync : string * System.ClientModel.BinaryContent * string * System.ClientModel.Primitives.RequestOptions -> System.Threading.Tasks.Task<System.ClientModel.ClientResult>
Public Overridable Function InvokeLatestToolboxMcpAsync (name As String, content As BinaryContent, contentType As String, Optional options As RequestOptions = Nothing) As Task(Of ClientResult)

Parameters

name
String

The name of the toolbox.

content
BinaryContent

The content to send as the body of the request.

contentType
String

The content type of the MCP request body.

options
RequestOptions

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

name, content or contentType is null.

name or contentType is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to

InvokeLatestToolboxMcpAsync(String, IDictionary<String,BinaryData>, String, CancellationToken)

Source:
AgentToolboxes.cs

Invokes the latest version of the specified toolbox through its MCP endpoint.

public virtual System.Threading.Tasks.Task<System.ClientModel.ClientResult<BinaryData>> InvokeLatestToolboxMcpAsync(string name, System.Collections.Generic.IDictionary<string,BinaryData> request, string contentType, System.Threading.CancellationToken cancellationToken = default);
abstract member InvokeLatestToolboxMcpAsync : string * System.Collections.Generic.IDictionary<string, BinaryData> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<BinaryData>>
override this.InvokeLatestToolboxMcpAsync : string * System.Collections.Generic.IDictionary<string, BinaryData> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.ClientModel.ClientResult<BinaryData>>
Public Overridable Function InvokeLatestToolboxMcpAsync (name As String, request As IDictionary(Of String, BinaryData), contentType As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of ClientResult(Of BinaryData))

Parameters

name
String

The name of the toolbox.

request
IDictionary<String,BinaryData>

The MCP request body.

contentType
String

The content type of the MCP request body.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

Exceptions

name, request or contentType is null.

name or contentType is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to