Add server "completions" capability (#232)

* Split apart Capabilities.cs

No code changes, just moving each type to its own file.

* Add server completions capability
This commit is contained in:
Stephen Toub 2025-04-07 16:59:37 -04:00 • committed by GitHub
commit 82510d5629
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,19 @@
using ModelContextProtocol.Server;
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol.Types;
/// <summary>
/// Represents the completions capability configuration.
/// <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">See the schema for details</see>
/// </summary>
public class CompletionsCapability
{
// Currently empty in the spec, but may be extended in the future.
/// <summary>
/// Gets or sets the handler for get completion requests.
/// </summary>
[JsonIgnore]
public Func<RequestContext<CompleteRequestParams>, CancellationToken, Task<CompleteResult>>? CompleteHandler { get; set; }
}