edit_latex_file
Modify LaTeX documents by replacing, inserting, or appending content to existing .tex files for precise editing and updates.
Instructions
Edit an existing LaTeX file by replacing, inserting, or appending content.
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": {
"file_path": "<file_path>",
"operation": "<operation>",
"new_text": "<new_text>"
},
"name": "edit_latex_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the .tex file to edit | |
| operation | Yes | Type of edit operation | |
| new_text | Yes | Text to insert or replace with | |
| search_text | No | Text to search for (required for replace/insert_before/insert_after) | |
| line_number | No | 1-based line number (alternative to search_text for insert operations) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the file | |
| success | Yes | ||
| message | Yes | ||
| content | No | File content if applicable |