Table of Contents

Class Reference

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents a reference to a resource or prompt in the Model Context Protocol.

[JsonConverter(typeof(Reference.Converter))]
public abstract class Reference
Inheritance
Reference
Derived
Inherited Members

Remarks

References are commonly used with CompleteAsync(IMcpClient, Reference, string, string, CancellationToken) to request completion suggestions for arguments, and with other methods that need to reference resources or prompts.

See the schema for details.

Properties

Type

Gets or sets the type of content.

[JsonPropertyName("type")]
public string Type { get; set; }

Property Value

string

Remarks

This can be "ref/resource" or "ref/prompt".