MCPcopy
hub / github.com/wshobson/agents / read_file

Function read_file

tools/adapters/base.py:18–23  ·  view source on GitHub ↗

Read file content as UTF-8 string, returning '' on missing/unreadable file.

(path: Path)

Source from the content-addressed store, hash-verified

16
17
18def read_file(path: Path) -> str:
19 """Read file content as UTF-8 string, returning '' on missing/unreadable file."""
20 try:
21 return path.read_text(encoding="utf-8")
22 except OSError:
23 return ""
24
25
26def read_plugin_json(plugin_dir: Path) -> dict:

Callers 2

emit_globalMethod · 0.90
load_pluginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected