Skip to content

[Filesystem] add append tools #1208

@bengbengbalabalabeng

Description

@bengbengbalabalabeng

Is your feature request related to a problem? Please describe.
Currently, if I want to append a new line of text to an existing .txt file using this tool, there only have wirte_file now.

Describe the solution you'd like
I would like a new tool to be added, named append_file or append_wirte_file. This function should perform the following actions:

Accept two main arguments: the path to the target text file and the string content to be appended. Write the provided string content to the end of the file.

Crucially, automatically add a newline character (\n or the appropriate OS-specific newline) after the appended content. This ensures that each call to this function adds the content on a new line, making subsequent appends also start on a fresh line.

Handle the closing of the file automatically and safely.

Describe alternatives you've considered
None.

Additional context
None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestserver-filesystemReference implementation for the Filesystem MCP server - src/filesystem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions