| 40 | type ReadFileTool struct{ BaseTool } |
| 41 | |
| 42 | func 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 | |
| 54 | func (t *ReadFileTool) ValidateInput(execCtx ExecutionContext, input any) (bool, string) { |
| 55 | in := deref[ReadFileInput](input) |