Table of Contents

Class ToolChoice

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Controls tool selection behavior for sampling requests.

public sealed class ToolChoice
Inheritance
ToolChoice
Inherited Members

Properties

Mode

Gets or sets the mode that controls which tools the model can call.

[JsonPropertyName("mode")]
public string? Mode { get; set; }

Property Value

string

Remarks

  • "auto"Model decides whether to call tools (default)
  • "required"Model must call at least one tool
  • "none"Model must not call any tools