csharp-sdk/src/ModelContextProtocol.Core/Protocol/ServerCapabilities.cs
Copilot 136755f2be
Remove obsolete APIs from codebase and standardize MCP diagnostic IDs (#985)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.com>
Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
2025-12-02 10:28:46 -08:00

68 lines
2.6 KiB
C#

using System.ComponentModel;
using System.Text.Json.Serialization;
using ModelContextProtocol.Server;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Represents the capabilities that a server supports.
/// </summary>
/// <remarks>
/// <para>
/// Server capabilities define the features and functionality available when clients connect.
/// These capabilities are advertised to clients during the initialize handshake.
/// </para>
/// <para>
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
/// </para>
/// </remarks>
public sealed class ServerCapabilities
{
/// <summary>
/// Gets or sets experimental, non-standard capabilities that the server supports.
/// </summary>
/// <remarks>
/// <para>
/// The <see cref="Experimental"/> dictionary allows servers to advertise support for features that are not yet
/// standardized in the Model Context Protocol specification. This extension mechanism enables
/// future protocol enhancements while maintaining backward compatibility.
/// </para>
/// <para>
/// Values in this dictionary are implementation-specific and should be coordinated between client
/// and server implementations. Clients should not assume the presence of any experimental capability
/// without checking for it first.
/// </para>
/// </remarks>
[JsonPropertyName("experimental")]
public IDictionary<string, object>? Experimental { get; set; }
/// <summary>
/// Gets or sets a server's logging capability for sending log messages to the client.
/// </summary>
[JsonPropertyName("logging")]
public LoggingCapability? Logging { get; set; }
/// <summary>
/// Gets or sets a server's prompts capability for serving predefined prompt templates that clients can discover and use.
/// </summary>
[JsonPropertyName("prompts")]
public PromptsCapability? Prompts { get; set; }
/// <summary>
/// Gets or sets a server's resources capability for serving predefined resources that clients can discover and use.
/// </summary>
[JsonPropertyName("resources")]
public ResourcesCapability? Resources { get; set; }
/// <summary>
/// Gets or sets a server's tools capability for listing tools that a client is able to invoke.
/// </summary>
[JsonPropertyName("tools")]
public ToolsCapability? Tools { get; set; }
/// <summary>
/// Gets or sets a server's completions capability for supporting argument auto-completion suggestions.
/// </summary>
[JsonPropertyName("completions")]
public CompletionsCapability? Completions { get; set; }
}