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

Method extract_tool_use_id

atomic-agent/src/hooks/hermes.rs:78–87  ·  view source on GitHub ↗
(raw: &Value)

Source from the content-addressed store, hash-verified

76 }
77
78 fn extract_tool_use_id(raw: &Value) -> Option<String> {
79 value_string(raw, "tool_use_id")
80 .or_else(|| value_string(raw, "tool_call_id"))
81 .or_else(|| value_string(raw, "call_id"))
82 .or_else(|| value_string(raw, "id"))
83 .or_else(|| value_at(raw, &["extra", "tool_use_id"]))
84 .or_else(|| value_at(raw, &["extra", "tool_call_id"]))
85 .or_else(|| value_at(raw, &["extra", "call_id"]))
86 .filter(|s| !s.is_empty())
87 }
88
89 fn config_path() -> Option<PathBuf> {
90 dirs::home_dir().map(|home| home.join(HERMES_DIR).join("config.yaml"))

Callers

nothing calls this directly

Calls 3

value_atFunction · 0.85
value_stringFunction · 0.70
is_emptyMethod · 0.45

Tested by

no test coverage detected