Class GetPromptResult
- Namespace
- ModelContextProtocol.Protocol
- Assembly
- ModelContextProtocol.dll
Represents a server's response to a PromptsGet request from the client.
public class GetPromptResult
- Inheritance
-
GetPromptResult
- Inherited Members
- Extension Methods
Remarks
For integration with AI client libraries, GetPromptResult can be converted to a collection of Microsoft.Extensions.AI.ChatMessage objects using the ToChatMessages(GetPromptResult) extension method.
See the schema for details.
Properties
Description
Gets or sets an optional description for the prompt.
[JsonPropertyName("description")]
public string? Description { get; set; }
Property Value
Remarks
This description provides contextual information about the prompt's purpose and use cases. It helps developers understand what the prompt is designed for and how it should be used.
When returned from a server in response to a PromptsGet request, this description can be used by client applications to provide context about the prompt or to display in user interfaces.
Messages
Gets or sets the prompt that the server offers.
[JsonPropertyName("messages")]
public List<PromptMessage> Messages { get; set; }