Skip to main content
Glama

write_file

Write content to files and create directories as needed within the MCP File Compaction server, which optimizes Claude's context window by summarizing inactive files to reduce costs.

Instructions

Write content to a file, creating it if it doesn't exist. The file becomes the active file.

Creates parent directories if needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the file to write
contentYesContent to write to the file

Latest Blog Posts

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/UBTCodeNinja/mcp-file-compaction'

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