Table of Contents

Class McpToolOptions

Namespace
GenerativeAI.Tools.Mcp
Assembly
GenerativeAI.Tools.dll

Configuration options for the McpTool.

public class McpToolOptions
Inheritance
McpToolOptions
Inherited Members
Extension Methods

Properties

AutoReconnect

Gets or sets whether to automatically reconnect to the MCP server if the connection is lost. Default is true.

public bool AutoReconnect { get; set; }

Property Value

bool

ConnectionTimeoutMs

Gets or sets the timeout for connecting to the MCP server (in milliseconds). Default is 30000ms (30 seconds).

public int ConnectionTimeoutMs { get; set; }

Property Value

int

IncludeDetailedErrors

Gets or sets whether to include detailed error information in function responses. Default is true.

public bool IncludeDetailedErrors { get; set; }

Property Value

bool

MaxReconnectAttempts

Gets or sets the maximum number of reconnection attempts. Default is 3.

public int MaxReconnectAttempts { get; set; }

Property Value

int

ThrowOnToolCallFailure

Gets or sets whether to throw exceptions on tool call failures. If false, failures will be returned as error responses. Default is false.

public bool ThrowOnToolCallFailure { get; set; }

Property Value

bool