Table of Contents

Class ToolCall

Namespace
AnthropicClient.Models
Assembly
AnthropicClient.dll

Represents a tool call.

public class ToolCall
Inheritance
ToolCall
Inherited Members

Constructors

ToolCall(Tool, ToolUseContent)

Initializes a new instance of the ToolCall class.

public ToolCall(Tool tool, ToolUseContent toolUse)

Parameters

tool Tool

The tool of the tool call.

toolUse ToolUseContent

The tool use of the tool call.

Properties

Tool

Gets the tool of the tool call.

public Tool Tool { get; }

Property Value

Tool

ToolUse

Gets the tool use of the tool call.

public ToolUseContent ToolUse { get; }

Property Value

ToolUseContent

Methods

InvokeAsync()

Invokes the tool call.

public Task<ToolCallResult<object>> InvokeAsync()

Returns

Task<ToolCallResult<object>>

The result of the tool call as an instance of ToolCallResult<T>.

InvokeAsync<T>()

Invokes the tool call.

public Task<ToolCallResult<T>> InvokeAsync<T>()

Returns

Task<ToolCallResult<T>>

The result of the tool call as an instance of ToolCallResult<T>.

Type Parameters

T

The type of the result value.

Exceptions

ArgumentException

Thrown when a parameter name is not found.

ArgumentException

Thrown when an argument is missing.