Write a file in the server folder
write_fileWrite server files like datapacks, configs, and server.properties inside the test server folder, creating directories as needed. Supports text or base64 content, optional overwrite, and size limits.
Instructions
Writes a file inside the test server folder, making folders as needed: datapacks (world/datapacks/...), configs, server.properties. Mods (.jar files and the mods folder) only if the person allowed it (allowModInstall). The world's chunk files, level.dat and eula.txt cannot be written. After writing server.properties the tool keeps RCON on 127.0.0.1. Use encoding base64 for binary files. Limited to maxFileBytes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path inside the test server folder, for example "world/datapacks/my_pack/pack.mcmeta" | |
| confirm | No | Set true only after the person agreed to this change (needed while confirmDestructive is on). | |
| content | Yes | File content, as text or base64 | |
| encoding | No | text | |
| overwrite | No | Replace a file that exists. Default false. |