Skip to main content
Glama

MCP Filesystem Server

MIT License
42
  • Apple
  • Linux

write_file

Create or update files on the MCP Filesystem Server by specifying the path, content, and optional encoding. Automatically generate parent directories if required.

Instructions

Create a new file or overwrite an existing file with new content.

Args: path: Path to write to content: Content to write encoding: File encoding (default: utf-8) create_dirs: Whether to create parent directories if they don't exist ctx: MCP context Returns: Success or error message

Input Schema

NameRequiredDescriptionDefault
contentYes
create_dirsNo
encodingNoutf-8
pathYes

Input Schema (JSON Schema)

{ "properties": { "content": { "title": "Content", "type": "string" }, "create_dirs": { "default": false, "title": "Create Dirs", "type": "boolean" }, "encoding": { "default": "utf-8", "title": "Encoding", "type": "string" }, "path": { "title": "Path", "type": "string" } }, "required": [ "path", "content" ], "title": "write_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