Skip to content

Commit 6a38242

Browse files
Copilotstephentoub
andauthored
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>
1 parent 2e17550 commit 6a38242

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/ModelContextProtocol.Core/Protocol/CreateMessageRequestParams.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,19 @@ public sealed class CreateMessageRequestParams : RequestParams
137137
/// <summary>
138138
/// Gets or sets tools that the model can use during generation.
139139
/// </summary>
140+
/// <remarks>
141+
/// The tool definitions in this array are scoped to this sampling request.
142+
/// They do not need to correspond to tools registered on the server via <see cref="RequestMethods.ToolsList"/>.
143+
/// </remarks>
140144
[JsonPropertyName("tools")]
141145
public IList<Tool>? Tools { get; set; }
142146

143147
/// <summary>
144148
/// Gets or sets controls for how the model uses tools.
145149
/// </summary>
150+
/// <remarks>
151+
/// This controls whether and how the model uses the request-scoped <see cref="Tools"/> during sampling.
152+
/// </remarks>
146153
[JsonPropertyName("toolChoice")]
147154
public ToolChoice? ToolChoice { get; set; }
148155

0 commit comments

Comments
 (0)