Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions src/ModelContextProtocol.Core/Protocol/CompleteContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System.Text.Json.Serialization;

namespace ModelContextProtocol.Protocol;

/// <summary>
/// Represents additional context information for completion requests.
/// </summary>
/// <remarks>
/// This context provides information that helps the server generate more relevant
/// completion suggestions, such as previously resolved variables in a template.
/// </remarks>
public class CompleteContext
{
/// <summary>
/// Gets or sets previously-resolved variables in a URI template or prompt.
/// </summary>
[JsonPropertyName("arguments")]
public IDictionary<string, string>? Arguments { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,11 @@ public class CompleteRequestParams : RequestParams
/// and the current partial input.
/// </summary>
[JsonPropertyName("argument")]
public required Argument Argument { get; init; }
public required Argument Argument { get; init; }

/// <summary>
/// Gets or sets additional, optional context for completions.
/// </summary>
[JsonPropertyName("context")]
public CompleteContext? Context { get; init; }
}