MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / initialize_root_paths

Function initialize_root_paths

src/mcp/server.rs:207–218  ·  view source on GitHub ↗
(params: Option<&Value>)

Source from the content-addressed store, hash-verified

205}
206
207fn initialize_root_paths(params: Option<&Value>) -> Vec<PathBuf> {
208 params
209 .and_then(|p| p.get("roots"))
210 .and_then(Value::as_array)
211 .into_iter()
212 .flatten()
213 .filter_map(|root| {
214 let uri = root.get("uri").and_then(Value::as_str)?;
215 crate::serve::local_path_from_mcp_root_uri(uri)
216 })
217 .collect()
218}
219
220fn match_initialize_root_to_registered_project(
221 root: &Path,

Callers 1

Calls 2

collectMethod · 0.80

Tested by

no test coverage detected