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

Function extract_tool_output

atomic-agent/src/hooks/codex.rs:536–546  ·  view source on GitHub ↗
(response: &Value)

Source from the content-addressed store, hash-verified

534}
535
536fn extract_tool_output(response: &Value) -> Option<String> {
537 if let Some(text) = response.as_str() {
538 return Some(text.to_string());
539 }
540 for key in ["output", "content", "result", "stdout", "message"] {
541 if let Some(text) = response.get(key).and_then(Value::as_str) {
542 return Some(text.to_string());
543 }
544 }
545 None
546}
547
548fn extract_tool_status(response: &Value) -> Option<String> {
549 if response

Callers 1

normalize_tool_rawFunction · 0.85

Calls 2

getMethod · 0.65
as_strMethod · 0.45

Tested by

no test coverage detected