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

Method exec_vault_read

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

Source from the content-addressed store, hash-verified

978 }
979
980 fn exec_vault_read(&self, args: &serde_json::Value) -> Result<String, String> {
981 let path = args["path"]
982 .as_str()
983 .ok_or("missing required parameter: path")?;
984
985 let entry = self
986 .repo
987 .vault_retrieve(path)
988 .map_err(|e| format!("vault_read failed: {e}"))?;
989
990 match entry {
991 Some(e) => {
992 let text = String::from_utf8_lossy(&e.content_bytes).into_owned();
993 Ok(text)
994 }
995 None => Err(format!("vault entry not found: {path}")),
996 }
997 }
998
999 fn exec_list_entities(&self, args: &serde_json::Value) -> Result<String, String> {
1000 let path_str = args["path"]

Callers 1

executeMethod · 0.80

Calls 2

vault_retrieveMethod · 0.80
as_strMethod · 0.45

Tested by

no test coverage detected