write_file_diff
Modifies large code files by replacing a specified line range with new content, reading the existing file and optionally creating a backup.
Instructions
긴 코드(6000토큰 초과)를 diff 방식으로 수정합니다. 기존 파일을 읽고 지정된 라인 범위를 새로운 내용으로 교체합니다.
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>",
"start_line": "<start_line>",
"end_line": "<end_line>",
"new_content": "<new_content>"
},
"name": "write_file_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backup | No | 백업 파일 생성 여부 (기본값: true) | |
| end_line | Yes | 교체할 끝 라인 번호 (inclusive) | |
| file_path | Yes | 수정할 파일의 경로 | |
| start_line | Yes | 교체할 시작 라인 번호 (1부터 시작) | |
| new_content | Yes | 교체할 새로운 코드 내용 |