MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / exec_kg_neighbors

Method exec_kg_neighbors

atomic-repository/src/ai/tools.rs:867–879  ·  view source on GitHub ↗
(&self, args: &serde_json::Value)

Source from the content-addressed store, hash-verified

865 }
866
867 fn exec_kg_neighbors(&self, args: &serde_json::Value) -> Result<String, String> {
868 let node_id = args["node_id"]
869 .as_str()
870 .ok_or("missing required parameter: node_id")?;
871 let depth = args["depth"].as_u64().unwrap_or(1).min(2) as u8;
872
873 let subgraph = self
874 .repo
875 .vault_kg_neighbors(node_id, depth)
876 .map_err(|e| format!("kg_neighbors failed: {e}"))?;
877
878 serde_json::to_string_pretty(&subgraph).map_err(|e| format!("serialize error: {e}"))
879 }
880
881 fn exec_read_file(&self, args: &serde_json::Value) -> Result<String, String> {
882 let path_str = args["path"]

Callers 1

executeMethod · 0.80

Calls 3

as_u64Method · 0.80
vault_kg_neighborsMethod · 0.80
as_strMethod · 0.45

Tested by

no test coverage detected