modelcontextprotocol / modelcontextprotocol/servers

[Filesystem] add append tools

Open
#1,208 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement server-filesystem
Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing write_file entry point in the filesystem server and any related tests. Add the requested append_file tool with path and content arguments, newline-per-call behavior, and safe file closing; done means appends are preserved in order and the existing write behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.