Class PromptReference | MCP C# SDK

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents a reference to a prompt, identified by its name.

public sealed class PromptReference : Reference, IBaseMetadata
Inheritance

PromptReference

Implements
Inherited Members

Properties

Name

Gets or sets the unique identifier for this item.

[JsonPropertyName("name")]
public required string Name { get; set; }

Property Value

string

Title

Gets or sets a title.

[JsonPropertyName("title")]
public string? Title { get; set; }

Property Value

string

Type

When overridden in a derived class, gets the type of content.

public override string Type { get; }

Property Value

string

"ref/resource" or "ref/prompt".

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.