Class Prompt
- Namespace
- ModelContextProtocol.Protocol
- Assembly
- ModelContextProtocol.Core.dll
Represents a prompt that the server offers.
public sealed class Prompt : IBaseMetadata
- Inheritance
-
Prompt
- Implements
- Inherited Members
Remarks
See the schema for details.
Properties
Arguments
Gets or sets a list of arguments that this prompt accepts for templating and customization.
[JsonPropertyName("arguments")]
public IList<PromptArgument>? Arguments { get; set; }
Property Value
Remarks
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 PromptsGet request, it can provide values for these arguments which will be substituted into the prompt template or otherwise used to render the prompt.
Description
Gets or sets an optional description of what this prompt provides.
[JsonPropertyName("description")]
public string? Description { get; set; }
Property Value
Remarks
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.
Meta
Gets or sets metadata reserved by MCP for protocol-level metadata.
[JsonPropertyName("_meta")]
public JsonObject? Meta { get; set; }
Property Value
Remarks
Implementations must not make assumptions about its contents.
Name
Gets or sets the unique identifier for this item.
[JsonPropertyName("name")]
public required string Name { get; set; }
Property Value
Title
Gets or sets a title.
[JsonPropertyName("title")]
public string? Title { get; set; }
Property Value
Remarks
This is intended for UI and end-user contexts. It is optimized to be human-readable and easily understood, even by those unfamiliar with domain-specific terminology. If not provided, Name may be used for display (except for tools, where Title, if present, should be given precedence over using Name).