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.

Properties

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.

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.