MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / NewReadFileTool

Function NewReadFileTool

tools/builtin.go:42–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40type ReadFileTool struct{ BaseTool }
41
42func NewReadFileTool() *ReadFileTool {
43 return &ReadFileTool{BaseTool{Spec: ToolSpec{
44 Name: "read_file",
45 Description: "Read a file from the local filesystem with line numbers. Supports offset and limit for large files.",
46 InputPrototype: ReadFileInput{},
47 ReadOnly: BoolPtr(true),
48 ConcurrencySafe: BoolPtr(true),
49 Destructive: BoolPtr(false),
50 MaxOutputChars: 200_000,
51 }}}
52}
53
54func (t *ReadFileTool) ValidateInput(execCtx ExecutionContext, input any) (bool, string) {
55 in := deref[ReadFileInput](input)

Callers

nothing calls this directly

Calls 1

BoolPtrFunction · 0.85

Tested by

no test coverage detected