Skip to content

Feature: Add patch action to file_write tool #404

Description

@Aaronontheweb

Problem

Currently, file_write requires providing the full file content, which is cumbersome for surgical edits.

Proposed Solution

Add a patch action to file_write that supports:

  • Action: "patch"
  • Path: file to modify
  • OldString: text to find
  • NewString: replacement text
  • ReplaceAll: boolean (optional, default false)

Benefits

  • Cleaner for small edits without full file reads
  • Safer (less chance of accidentally overwriting unrelated sections)
  • Aligns with user workflow preferences

Implementation Notes

  • Should support both single-replace and multi-replace modes
  • Consider adding OldText / NewText as alternative parameter names for consistency with other tools

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions