Root

data class Root(val uri: String, val name: String? = null, val meta: JsonObject? = null) : WithMeta(source)

Represents a root directory or file that the server can operate on.

Roots define the top-level locations that a server has access to. They act as boundaries for the server's operations, ensuring it only accesses permitted locations.

Constructors

Link copied to clipboard
constructor(uri: String, name: String? = null, meta: JsonObject? = null)

Properties

Link copied to clipboard
open val _meta: JsonObject
Link copied to clipboard
@SerialName(value = "_meta")
open override val meta: JsonObject?

Optional metadata for this root.

Link copied to clipboard
val name: String?

An optional name for the root. This can be used to provide a human-readable identifier for the root, which may be useful for display purposes or for referencing the root in other parts of the application.

Link copied to clipboard
val uri: String

The URI identifying the root. This must start with file:// for now. This restriction may be relaxed in future versions of the protocol to allow other URI schemes. Examples: "file:///home/user/projects", "file:///workspace/repo", "file:///C:/Documents"