Skip to main content
Glama

MCP Filesystem Server

MIT License
42
  • Apple
  • Linux

edit_file

Modify text files by specifying line-based edits, generating a Git-style diff for tracking changes. Supports custom text encoding and optional dry-run mode for previewing modifications without saving.

Instructions

Make line-based edits to a text file.

Args: path: Path to the file edits: List of {oldText, newText} dictionaries encoding: Text encoding (default: utf-8) dry_run: If True, return diff but don't modify file ctx: MCP context Returns: Git-style diff showing changes

Input Schema

NameRequiredDescriptionDefault
dry_runNo
editsYes
encodingNoutf-8
pathYes

Input Schema (JSON Schema)

{ "properties": { "dry_run": { "default": false, "title": "Dry Run", "type": "boolean" }, "edits": { "items": { "additionalProperties": { "type": "string" }, "type": "object" }, "title": "Edits", "type": "array" }, "encoding": { "default": "utf-8", "title": "Encoding", "type": "string" }, "path": { "title": "Path", "type": "string" } }, "required": [ "path", "edits" ], "title": "edit_fileArguments", "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/safurrier/mcp-filesystem'

If you have feedback or need assistance with the MCP directory API, please join our Discord server