Table of Contents

Class TextContentBlock

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents text provided to or from an LLM.

public sealed class TextContentBlock : ContentBlock
Inheritance
TextContentBlock
Inherited Members
Extension Methods

Properties

Text

Gets or sets the text content of the message.

[JsonPropertyName("text")]
public required string Text { 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

The type of content. Valid values include "image", "audio", "text", "resource", "resource_link", "tool_use", and "tool_result".

Remarks

This value determines the structure of the content object.

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.