- Namespace
- ModelContextProtocol.Protocol
- Assembly
- ModelContextProtocol.Core.dll
Represents content within the Model Context Protocol (MCP).
[JsonConverter(typeof(ContentBlock.Converter))]
public abstract class ContentBlock
- Inheritance
-
ContentBlock
- Derived
- Inherited Members
- Extension Methods
Remarks
Properties
Annotations
Gets or sets optional annotations for the content.
[JsonPropertyName("annotations")]
public Annotations? Annotations { get; set; }
Property Value
Remarks
Meta
Gets or sets metadata reserved by MCP for protocol-level metadata.
[JsonPropertyName("_meta")]
public JsonObject? Meta { get; set; }
Property Value
Remarks
Type
When overridden in a derived class, gets the type of content.
[JsonPropertyName("type")]
public abstract string Type { get; }
Property Value
- string
The type of content. Valid values include "image", "audio", "text", "resource", "resource_link", "tool_use", and "tool_result".