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

getRoot

Last update:
May 18, 2026
Retrieves the definition of a single root previously associated with an MCP client by its logical name, returning a struct describing the root or null if not found.

Description

The getRoot function retrieves the definition of a single root previously associated with an MCP client. A root is a named URI that tells the server where to look for relevant resources (for example, a directory, repository, or logical data domain).
Use getRoot when you need to:
  • Inspect which root a given name resolves to (e.g., "samples"file:///home/user/samples).
  • Validate that a particular root has been registered before using it in your own logic.

Returns

A struct describing the root if found, or null / undefined (depending on implementation) if no root with that name exists.

Syntax

getRoot(string name)
Called as an instance method on an MCP client:
root = mcpClient.getRoot("samples");

History

New in ColdFusion 2025.0.08

Parameters

getRoot parameters
FieldData typeRequiredDescription
nameStringYesLogical name/label for this root.

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