Table of Contents

Class Root

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents a root URI and its metadata in the Model Context Protocol.

public sealed class Root
Inheritance
Root
Inherited Members

Remarks

Root URIs serve as entry points for resource navigation, typically representing top-level directories or container resources that can be accessed and traversed. Roots provide a hierarchical structure for organizing and accessing resources within the protocol. Each root has a URI that uniquely identifies it and optional metadata like a human-readable name.

Properties

Meta

Gets or sets additional metadata for the root.

[JsonPropertyName("_meta")]
public JsonElement? Meta { get; init; }

Property Value

JsonElement?

Remarks

This is reserved by the protocol for future use.

Name

Gets or sets a human-readable name for the root.

[JsonPropertyName("name")]
public string? Name { get; init; }

Property Value

string

Uri

Gets or sets the URI of the root.

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

Property Value

string