append_to_file
Append text to the end of an existing file in a ShareLaTeX project and optionally verify its SHA-256 hash to avoid writing to stale content.
Instructions
Append text to the end of an existing 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. file_path must
already exist. A text document is updated in place. An uploaded file
is downloaded, extended, and re-uploaded.
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": "append_to_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 |