string_replace
Replace a specific string in a file with a new string using the TypeScript MCP server. Specify the file path, the string to replace, and the new string for precise text editing.
Instructions
Replace a string in a file with a new string
Input Schema
Name | Required | Description | Default |
---|---|---|---|
new_str | No | Replacement string (empty string if omitted) | |
old_str | Yes | String to replace | |
path | Yes | Absolute path to the file |
Input Schema (JSON Schema)
{
"properties": {
"new_str": {
"description": "Replacement string (empty string if omitted)",
"type": "string"
},
"old_str": {
"description": "String to replace",
"type": "string"
},
"path": {
"description": "Absolute path to the file",
"type": "string"
}
},
"required": [
"path",
"old_str"
],
"type": "object"
}