You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <param name="arguments">An optional dictionary of arguments to pass to the tool. Each key represents a parameter name,
97
+
/// and its associated value represents the argument value.
98
+
/// </param>
99
+
/// <param name="progress">
100
+
/// An optional <see cref="IProgress{T}"/> to have progress notifications reported to it. Setting this to a non-<see langword="null"/>
101
+
/// value will result in a progress token being included in the call, and any resulting progress notifications during the operation
102
+
/// routed to this instance.
103
+
/// </param>
104
+
/// <param name="serializerOptions">
105
+
/// The JSON serialization options governing argument serialization. If <see langword="null"/>, the default serialization options will be used.
106
+
/// </param>
107
+
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
108
+
/// <returns>
109
+
/// A task containing the <see cref="CallToolResponse"/> from the tool execution. The response includes
110
+
/// the tool's output content, which may be structured data, text, or an error message.
111
+
/// </returns>
112
+
/// <remarks>
113
+
/// The base <see cref="AIFunction.InvokeAsync"/> method is overridden to invoke this <see cref="CallAsync"/> method.
114
+
/// The only difference in behavior is <see cref="AIFunction.InvokeAsync"/> will serialize the resulting <see cref="CallToolResponse"/>"/>
115
+
/// such that the <see cref="object"/> returned is a <see cref="JsonElement"/> containing the serialized <see cref="CallToolResponse"/>.
116
+
/// This <see cref="CallToolResponse"/> method is intended to be called directly by user code, whereas the base <see cref="AIFunction.InvokeAsync"/>
117
+
/// is intended to be used polymorphically via the base class, typically as part of an <see cref="IChatClient"/> operation.
118
+
/// </remarks>
119
+
/// <exception cref="McpException">The server could not find the requested tool, or the server encountered an error while processing the request.</exception>
0 commit comments