- Namespace
- ModelContextProtocol.Protocol
- Assembly
- ModelContextProtocol.Core.dll
Represents a known resource that the server is capable of reading.
public sealed class Resource : IBaseMetadata
- Inheritance
-
Resource
- Implements
- Inherited Members
Properties
Annotations
Gets or sets optional annotations for the resource.
[JsonPropertyName("annotations")]
public Annotations? Annotations { get; set; }
Property Value
Description
Gets or sets a description of what this resource represents.
[JsonPropertyName("description")]
public string? Description { get; set; }
Property Value
Icons
Gets or sets an optional list of icons for this resource.
[JsonPropertyName("icons")]
public IList<Icon>? Icons { get; set; }
Property Value
Meta
Gets or sets metadata reserved by MCP for protocol-level metadata.
[JsonPropertyName("_meta")]
public JsonObject? Meta { get; set; }
Property Value
MimeType
Gets or sets the MIME type of this resource.
[JsonPropertyName("mimeType")]
public string? MimeType { get; set; }
Property Value
Name
Gets or sets the unique identifier for this item.
[JsonPropertyName("name")]
public required string Name { get; set; }
Property Value
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.
[JsonPropertyName("title")]
public string? Title { get; set; }
Property Value
Uri
Gets or sets the URI of this resource.
[JsonPropertyName("uri")]
[StringSyntax("Uri")]
public required string Uri { get; set; }