Write File
write_fileCreate or replace .tsx, .ts, .css, or .json files in a Remotion project to build custom components, themes, and shared utilities that pre-built templates don't cover.
Instructions
Write a code file (.tsx, .ts, .css, .json) to the Remotion project. Use this to create custom components, theme files, shared utils, or any code the pre-built templates don't cover. Protected system files (Root.tsx, composition.json, package.json, etc.) cannot be overwritten. If the file already exists it will be replaced — a warning is included in the response. Call read_file first if you need to inspect existing content before editing.
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": {
"projectPath": "<projectPath>",
"filePath": "<filePath>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Full UTF-8 file content to write | |
| filePath | Yes | Path relative to project root where the file will be written. Allowed extensions: .tsx, .ts, .css, .json. Example: "src/overlays/BouncingBall.tsx" | |
| projectPath | Yes | Absolute path to the Remotion project root |