MCPcopy Create free account
hub / github.com/codehamr/codehamr / ReadFile

Function ReadFile

internal/tools/read.go:14–30  ·  view source on GitHub ↗

ReadFile returns path's contents, truncated to the shared tool-output budget (Truncate). The model gets exact bytes, not a shell-mangled approximation. Per the bash/write/edit convention, filesystem errors come back in the output string, never as a Go error: the model reacts to them like a non-zero

(path string)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 6

TestReadFileHappyFunction · 0.85
TestReadFileEmptyPathFunction · 0.85
TestReadFileMissingFileFunction · 0.85
runRawFunction · 0.85

Calls

no outgoing calls

Tested by 5

TestReadFileHappyFunction · 0.68
TestReadFileEmptyPathFunction · 0.68
TestReadFileMissingFileFunction · 0.68