Whatever message this page gives is out now! Go check it out!

addRoot

Last update:
May 18, 2026
Registers a root with your MCP client at runtime. A root is a named URI that provides instruction to the MCP server to scope resources, hint at relevant directories, and improve performance.

Description

The addRoot function registers a root with your MCP client at runtime. A root is a named URI that provides instruction to the MCP server.
Roots are used to:
  • Scope which resources the client can see (security and least privilege).
  • Give the server hints about relevant directories, repositories, or data domains.
  • Improve performance and relevance when listing or reading resources.

Returns

Void

Syntax

addRoot(struct root)
Called as an instance method on an MCP client:
mcpClient.addRoot(root)

History

New in ColdFusion 2025.8

Parameters

addRoot parameters
FieldData typeRequiredDescription
nameStringYesLogical name/label for this root.
uriStringYesURI for the root (e.g. file:// or custom schemes).

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page