Table of Contents

Class TextResourceContents

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.dll

Represents text-based contents of a resource in the Model Context Protocol.

public class TextResourceContents : ResourceContents
Inheritance
TextResourceContents
Inherited Members
Extension Methods

Remarks

TextResourceContents is used when textual data needs to be exchanged through the Model Context Protocol. The text is stored directly in the Text property.

This class inherits from ResourceContents, which also has a sibling implementation BlobResourceContents for binary resources. When working with resources, the appropriate type is chosen based on the nature of the content.

See the schema for more details.

Properties

Text

Gets or sets the text of the item.

[JsonPropertyName("text")]
public string Text { get; set; }

Property Value

string