@nogoo9/mcp-server-cloud-fs / resolveToolPath
Function: resolveToolPath()
resolveToolPath(
allowedRoots,toolPath):object
Defined in: path-utils.ts:71
Resolve a tool path (relative or absolute URI) against allowed roots.
Validates that the resolved path falls within at least one configured root. Throws "Access denied: path is outside allowed roots" on violation.
Parameters
allowedRoots
Configured storage roots to validate against.
toolPath
string
User-supplied path (relative or absolute URI).
Returns
object
The matching root and the normalized key.
key
key:
string
root
root:
ParsedRoot
