Skip to main content
Glama

MCP Filesystem Server

MIT License
35
7
  • Linux
  • Apple

edit_file

Perform line-based text file edits by replacing exact line sequences with new content. Generates a git-style diff to preview or track changes. Works within predefined secure directories on the MCP Filesystem Server.

Instructions

Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within allowed directories.

Input Schema

NameRequiredDescriptionDefault
dryRunNoPreview changes using git-style diff format
editsYesList of edit operations to perform
pathYesPath to the file to edit

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "dryRun": { "default": false, "description": "Preview changes using git-style diff format", "type": "boolean" }, "edits": { "description": "List of edit operations to perform", "items": { "additionalProperties": false, "properties": { "newText": { "description": "Text to replace with", "type": "string" }, "oldText": { "description": "Text to search for - must match exactly", "type": "string" } }, "required": [ "oldText", "newText" ], "type": "object" }, "type": "array" }, "path": { "description": "Path to the file to edit", "type": "string" } }, "required": [ "path", "edits" ], "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/gabrielmaialva33/mcp-filesystem'

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