/** * Write File Tool - Write or create files on the filesystem */ import type { Tool } from '../types.js'; /** * Input parameters for write_file tool */ export interface WriteFileInput { /** * Path to the file to write */ path: string; /** * Content to write to the file */ content: string; /** * Encoding to use (default: utf-8) */ encoding?: BufferEncoding; /** * Create parent directories if they don't exist (default: true) */ createDirs?: boolean; /** * Append to file instead of overwriting (default: false) */ append?: boolean; } /** * Write file tool definition */ export declare const writeFileTool: Tool; /** * Factory function to create a write_file tool with custom options */ export declare function createWriteFileTool(options?: { /** * Base directory to resolve relative paths against */ baseDir?: string; /** * List of allowed file extensions (e.g., ['.ts', '.js', '.json']) */ allowedExtensions?: string[]; /** * Maximum content size in bytes (default: 10MB) */ maxContentSize?: number; /** * Directories that cannot be written to */ blockedPaths?: string[]; }): Tool;