Helper module used to build Root structure: a directory or file the
client lets the server work in.
(MCP protocol: 2025-11-25)
The client sends the roots; the server reads them with
OzMcp.Client.list_roots/2. This module builds the same map, for example
for a test double of a client. uri must be a file:// URI.
Short example:
%Root{}
|> Root.uri("file:///home/user/project")
|> Root.name("Project")
|> Root.build()Result:
%{uri: "file:///home/user/project", name: "Project"}Specification: Root
Fields
| Field | Setter | Type | Required |
|---|---|---|---|
uri | uri/2 | string | yes |
name | name/2 | string | no |
_meta | _meta/2 | map | no |