MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _read_tool

Function _read_tool

tests/test_hook_bash_read.py:81–86  ·  view source on GitHub ↗
(path, proj, *, sid=SID)

Source from the content-addressed store, hash-verified

79
80
81def _read_tool(path, proj, *, sid=SID):
82 payload = {"session_id": sid, "hook_event_name": "PreToolUse", "tool_name": "Read",
83 "cwd": str(proj), "tool_input": {"file_path": str(path)}}
84 r = subprocess.run([sys.executable, "-m", "graphify", "hook-guard", "read"], input=json.dumps(payload),
85 capture_output=True, text=True, cwd=proj, env=_env(proj))
86 return r.stdout
87
88
89def _is_read_nudge(out):

Calls 2

_envFunction · 0.70
runMethod · 0.65

Tested by

no test coverage detected