Skip to content

Implement Batch File Operations: readManyFiles and writeManyFiles #5

@bsmi021

Description

@bsmi021

Objective

Implement two new batch file operation capabilities in the server:

  1. readManyFiles: Accepts a list of file names and returns their contents in a single request. This improves efficiency for LLMs and clients needing to load multiple files at once.
  2. writeManyFiles: Accepts a JSON array of objects, each containing a file name and content, and writes all files in a single operation. This enables clients to quickly persist multiple files to disk without separate requests per file.

Requirements

  • Expose both capabilities via the HTTP API and ensure documentation is updated accordingly.
  • Ensure error handling for missing files (in readManyFiles) and write failures (in writeManyFiles) is robust and well-documented in responses.
  • Provide example payloads and responses for both endpoints in the documentation.
  • Unit and integration tests for both endpoints, including edge cases (e.g., partial failures).

Acceptance Criteria

  • readManyFiles and writeManyFiles endpoints are available and documented.
  • Batch operations are significantly more efficient than 1-by-1 file operations.
  • Tests validate correct handling of normal and error cases.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions