Table of Contents

Class Content

Namespace
ModelContextProtocol.Protocol.Types
Assembly
ModelContextProtocol.dll

Represents the content of a tool response. See the schema for details There are multiple subtypes of content, depending on the "type" field, these are represented as separate classes.

public class Content
Inheritance
Content
Inherited Members
Extension Methods

Properties

Annotations

Optional annotations for the content.

[JsonPropertyName("annotations")]
public Annotations? Annotations { get; init; }

Property Value

Annotations

Data

The base64-encoded image data.

[JsonPropertyName("data")]
public string? Data { get; set; }

Property Value

string

MimeType

The MIME type of the image.

[JsonPropertyName("mimeType")]
public string? MimeType { get; set; }

Property Value

string

Resource

The resource content of the message (if embedded).

[JsonPropertyName("resource")]
public ResourceContents? Resource { get; set; }

Property Value

ResourceContents

Text

The text content of the message.

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

Property Value

string

Type

The type of content. This determines the structure of the content object. Can be "image", "audio", "text", "resource".

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

Property Value

string