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

Method exec_kg_search

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

Source from the content-addressed store, hash-verified

851
852impl<'a> RepoToolExecutor<'a> {
853 fn exec_kg_search(&self, args: &serde_json::Value) -> Result<String, String> {
854 let query = args["query"]
855 .as_str()
856 .ok_or("missing required parameter: query")?;
857 let limit = args["limit"].as_u64().unwrap_or(10) as usize;
858
859 let nodes = self
860 .repo
861 .vault_kg_search(query, limit, None)
862 .map_err(|e| format!("kg_search failed: {e}"))?;
863
864 serde_json::to_string_pretty(&nodes).map_err(|e| format!("serialize error: {e}"))
865 }
866
867 fn exec_kg_neighbors(&self, args: &serde_json::Value) -> Result<String, String> {
868 let node_id = args["node_id"]

Callers 1

executeMethod · 0.80

Calls 3

as_u64Method · 0.80
vault_kg_searchMethod · 0.80
as_strMethod · 0.45

Tested by

no test coverage detected