Table of Contents

Class EmbeddedResourceBlock

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents the contents of a resource, embedded into a prompt or tool call result.

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

Remarks

It is up to the client how best to render embedded resources for the benefit of the LLM and/or the user.

Constructors

EmbeddedResourceBlock()

Initializes the instance of the ResourceLinkBlock class.

public EmbeddedResourceBlock()

Properties

Meta

Gets or sets metadata reserved by MCP for protocol-level metadata.

[JsonPropertyName("_meta")]
public JsonObject? Meta { get; set; }

Property Value

JsonObject

Remarks

Implementations must not make assumptions about its contents.

Resource

Gets or sets the resource content of the message when Type is "resource".

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

Property Value

ResourceContents

Remarks

Resources can be either text-based (TextResourceContents) or binary (BlobResourceContents), allowing for flexible data representation. Each resource has a URI that can be used for identification and retrieval.