Clarify request-scoped tool semantics in CreateMessageRequestParams (#1295)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
Copilot 2026-02-17 16:05:01 -05:00 • committed by GitHub
commit 6a38242fc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -137,12 +137,19 @@ public sealed class CreateMessageRequestParams : RequestParams
/// <summary>
/// Gets or sets tools that the model can use during generation.
/// </summary>
/// <remarks>
/// The tool definitions in this array are scoped to this sampling request.
/// They do not need to correspond to tools registered on the server via <see cref="RequestMethods.ToolsList"/>.
/// </remarks>
[JsonPropertyName("tools")]
public IList<Tool>? Tools { get; set; }
/// <summary>
/// Gets or sets controls for how the model uses tools.
/// </summary>
/// <remarks>
/// This controls whether and how the model uses the request-scoped <see cref="Tools"/> during sampling.
/// </remarks>
[JsonPropertyName("toolChoice")]
public ToolChoice? ToolChoice { get; set; }