write_file
Create or overwrite files in a ShareLaTeX project, updating text documents or re-uploading files and optionally checking SHA-256 to prevent stale writes.
Instructions
Create or overwrite a file in a ShareLaTeX project.
This changes the remote project. The MCP client controls user confirmation.
expected_sha256 optionally guards against stale content (UTF-8 SHA-256). project is a project name or id. An existing text
document is updated in place. An existing uploaded file is re-uploaded.
A missing file is created by upload. content is the full new text.
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": {
"project": "<project>",
"file_path": "<file_path>",
"content": "<content>"
},
"name": "write_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| project | Yes | ||
| file_path | Yes | ||
| expected_sha256 | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |