Class PromptsCapability
- Namespace
- ModelContextProtocol.Protocol
- Assembly
- ModelContextProtocol.Core.dll
Represents the server's capability to provide predefined prompt templates that clients can use.
public sealed class PromptsCapability
- Inheritance
-
PromptsCapability
- Inherited Members
Remarks
The prompts capability allows a server to expose a collection of predefined prompt templates that clients can discover and use. These prompts can be static (defined in the PromptCollection) or dynamically generated through handlers.
See the schema for details.
Properties
ListChanged
Gets or sets whether this server supports notifications for changes to the prompt list.
[JsonPropertyName("listChanged")]
public bool? ListChanged { get; set; }
Property Value
- bool?
Remarks
When set to true, the server will send notifications using PromptListChangedNotification when prompts are added, removed, or modified. Clients can register handlers for these notifications to refresh their prompt cache. This capability enables clients to stay synchronized with server-side changes to available prompts.