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

Method append_tool_call

atomic-agent/src/provenance/accumulator/append.rs:57–90  ·  view source on GitHub ↗
(
        &mut self,
        tool_name: &str,
        tool_call_id: Option<&str>,
        tool_input: Option<&serde_json::Value>,
        tool_output: Option<&str>,
        status: Option<&str>,
     

Source from the content-addressed store, hash-verified

55 /// Returns the new node's ID.
56 #[allow(clippy::too_many_arguments)]
57 pub fn append_tool_call(
58 &mut self,
59 tool_name: &str,
60 tool_call_id: Option<&str>,
61 tool_input: Option<&serde_json::Value>,
62 tool_output: Option<&str>,
63 status: Option<&str>,
64 duration_ms: Option<u64>,
65 timestamp: i64,
66 ) -> String {
67 let kind = classify_tool_call(tool_name, tool_input, tool_output, status);
68 let summary = summarize_tool_call(tool_name, kind, tool_input, tool_output, status);
69
70 let mut node =
71 GraphNode::new(self.next_id(), kind, timestamp, summary).with_tool_name(tool_name);
72
73 if let Some(id) = tool_call_id {
74 node = node.with_tool_call_id(id);
75 }
76 if let Some(ms) = duration_ms {
77 node = node.with_duration_ms(ms);
78 }
79
80 // Attach detail based on kind
81 node.detail = build_tool_detail(kind, tool_name, tool_input, tool_output, status);
82
83 let node_id = node.id.clone();
84
85 // Infer edges based on the classified kind
86 self.infer_edges(&node_id, kind);
87
88 self.push_node(node);
89 node_id
90 }
91
92 /// Append a reasoning/thinking node (chain-of-thought from the model).
93 ///

Calls 10

classify_tool_callFunction · 0.85
summarize_tool_callFunction · 0.85
build_tool_detailFunction · 0.85
next_idMethod · 0.80
with_tool_call_idMethod · 0.80
with_duration_msMethod · 0.80
infer_edgesMethod · 0.80
push_nodeMethod · 0.80
with_tool_nameMethod · 0.45
cloneMethod · 0.45