Table of Contents

Class ImageContentBlock

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents an image provided to or from an LLM.

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

Properties

Data

Gets or sets the base64-encoded image data.

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

Property Value

string

MimeType

Gets or sets the MIME type (or "media type") of the content, specifying the format of the data.

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

Property Value

string

Remarks

Common values include "image/png" and "image/jpeg".

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.