Class ResourceLinkBlock | MCP C# SDK

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents a resource that the server is capable of reading, included in a prompt or tool call result.

public sealed class ResourceLinkBlock : ContentBlock
Inheritance

ResourceLinkBlock

Inherited Members
Extension Methods

Properties

Description

Gets or sets a description of what this resource represents.

[JsonPropertyName("description")]
public string? Description { get; set; }

Property Value

string

Icons

Gets or sets an optional list of icons for this resource.

[JsonPropertyName("icons")]
public IList<Icon>? Icons { get; set; }

Property Value

IList<Icon>

MimeType

Gets or sets the MIME type of this resource.

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

Property Value

string

Name

Gets or sets a human-readable name for this resource.

[JsonPropertyName("name")]
public required string Name { get; set; }

Property Value

string

Size

Gets or sets the size of the raw resource content (before base64 encoding), in bytes, if known.

[JsonPropertyName("size")]
public long? Size { get; set; }

Property Value

long?

Title

Gets or sets a title for this resource.

[JsonPropertyName("title")]
public string? Title { get; set; }

Property Value

string

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".

Uri

Gets or sets the URI of this resource.

[JsonPropertyName("uri")]
[StringSyntax("Uri")]
public required string Uri { get; set; }

Property Value

string