using System.Text.Json.Nodes; using System.Text.Json.Serialization; using ModelContextProtocol.Server; namespace ModelContextProtocol.Protocol; /// /// Represents a prompt that the server offers. /// /// /// See the schema for details. /// public sealed class Prompt : IBaseMetadata { /// [JsonPropertyName("name")] public required string Name { get; set; } /// [JsonPropertyName("title")] public string? Title { get; set; } /// /// Gets or sets an optional description of what this prompt provides. /// /// /// /// This description helps developers understand the purpose and use cases for the prompt. /// It should explain what the prompt is designed to accomplish and any important context. /// /// /// The description is typically used in documentation, UI displays, and for providing context /// to client applications that may need to choose between multiple available prompts. /// /// [JsonPropertyName("description")] public string? Description { get; set; } /// /// Gets or sets a list of arguments that this prompt accepts for templating and customization. /// /// /// /// This list defines the arguments that can be provided when requesting the prompt. /// Each argument specifies metadata like name, description, and whether it's required. /// /// /// When a client makes a request, it can provide values for these arguments /// that will be substituted into the prompt template or otherwise used to render the prompt. /// /// [JsonPropertyName("arguments")] public IList? Arguments { get; set; } /// /// Gets or sets an optional list of icons for this prompt. /// /// /// This list can be used by clients to display the prompt's icon in a user interface. /// [JsonPropertyName("icons")] public IList? Icons { get; set; } /// /// Gets or sets metadata reserved by MCP for protocol-level metadata. /// /// /// Implementations must not make assumptions about its contents. /// [JsonPropertyName("_meta")] public JsonObject? Meta { get; set; } /// /// Gets or sets the callable server prompt corresponding to this metadata if any. /// [JsonIgnore] public McpServerPrompt? McpServerPrompt { get; set; } }