MCPcopy Create free account
hub / github.com/AI45Lab/Code / read_file

Method read_file

core/src/agent_api/direct_tools.rs:42–46  ·  view source on GitHub ↗
(&self, path: &str)

Source from the content-addressed store, hash-verified

40 }
41
42 pub(super) async fn read_file(&self, path: &str) -> Result<String> {
43 let args = serde_json::json!({ "file_path": path });
44 let result = self.tool_executor.execute("read", &args).await?;
45 Ok(result.output)
46 }
47
48 pub(super) async fn write_file(&self, path: &str, content: &str) -> Result<ToolCallResult> {
49 let args = serde_json::json!({ "file_path": path, "content": content });

Calls 1

executeMethod · 0.45