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

Function make_pre_tool_event

core/src/hooks/matcher.rs:247–255  ·  view source on GitHub ↗
(session_id: &str, tool: &str, args: serde_json::Value)

Source from the content-addressed store, hash-verified

245 use crate::hooks::events::PreToolUseEvent;
246
247 fn make_pre_tool_event(session_id: &str, tool: &str, args: serde_json::Value) -> HookEvent {
248 HookEvent::PreToolUse(PreToolUseEvent {
249 session_id: session_id.to_string(),
250 tool: tool.to_string(),
251 args,
252 working_directory: "/workspace".to_string(),
253 recent_tools: vec![],
254 })
255 }
256
257 #[test]
258 fn test_empty_matcher_matches_all() {

Calls

no outgoing calls