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

Method tool_execution

core/src/trace.rs:37–57  ·  view source on GitHub ↗
(
        name: impl Into<String>,
        success: bool,
        exit_code: i32,
        duration: Duration,
        output_bytes: usize,
        metadata: Option<&serde_json::Value>,
    )

Source from the content-addressed store, hash-verified

35
36impl TraceEvent {
37 pub fn tool_execution(
38 name: impl Into<String>,
39 success: bool,
40 exit_code: i32,
41 duration: Duration,
42 output_bytes: usize,
43 metadata: Option<&serde_json::Value>,
44 ) -> Self {
45 Self {
46 schema: TRACE_EVENT_SCHEMA.to_string(),
47 kind: TraceEventKind::ToolExecution,
48 name: name.into(),
49 success,
50 exit_code,
51 duration_ms: duration.as_millis().min(u128::from(u64::MAX)) as u64,
52 output_bytes,
53 metadata_keys: metadata_keys(metadata),
54 artifact_uris: artifact_uris(metadata),
55 details: None,
56 }
57 }
58
59 pub fn program_execution(
60 name: impl Into<String>,

Callers

nothing calls this directly

Calls 2

metadata_keysFunction · 0.85
artifact_urisFunction · 0.70

Tested by

no test coverage detected