Reads up to length bytes starting at offset. Returns a JSON object with content, bytes_read, offset, and total_size so callers can page through files larger than the chunk size.
All paths are resolved relative to base_dir. Path traversal attempts (e.g., ../../etc/passwd) are blocked.
By default, write_file is restricted to the session files directory even when a custom base_dir is configured. This prevents the agent from modifying files in the working directory unless explicitly opted in via allow_external_writes: true.
# Use session files directory (default)
nexus.tool.file: {}
# Use a specific directory (reads from workspace, writes to session files)
nexus.tool.file:
base_dir: /home/user/workspace
# Allow writes to the workspace directory
nexus.tool.file:
base_dir: /home/user/workspace
allow_external_writes: true