/** * Read File Tool - Read contents of a file from the filesystem */ import type { Tool } from '../types.js'; /** * Input parameters for read_file tool */ export interface ReadFileInput { /** * Path to the file to read */ path: string; /** * Encoding to use (default: utf-8) */ encoding?: BufferEncoding; /** * Maximum number of lines to read (default: all) */ maxLines?: number; /** * Line offset to start reading from (1-indexed, default: 1) */ startLine?: number; } /** * Read file tool definition */ export declare const readFileTool: Tool; /** * Factory function to create a read_file tool with custom options */ export declare function createReadFileTool(options?: { /** * Base directory to resolve relative paths against */ baseDir?: string; /** * List of allowed file extensions (e.g., ['.ts', '.js', '.json']) */ allowedExtensions?: string[]; /** * Maximum file size to read in bytes (default: 10MB). * Files larger than this are rejected entirely. */ maxFileSize?: number; /** * Maximum content size returned to agent in bytes (default: 100KB). * Content larger than this is truncated. */ maxContentSize?: number; /** * Whether to truncate large content (true) or reject (false). * Default: true */ truncateIfLarge?: boolean; }): Tool;