remove_from_array
Remove a specific item from arrays in JSON, YAML, TOML, or Python files by matching stripped text values. Use this tool to edit configuration files or module-level lists without manual search-and-replace operations.
Instructions
Remove the first element matching value_match (stripped text equality) from an array/list. Works for JSON/YAML/TOML config arrays AND Python module-level list literals.
For JSON/YAML/TOML: target is the dotted path to the array. For Python (.py): target is the module-level variable name.
Use this when: You want to remove a specific item from a list.
Don't use this when: You want to remove a whole key -> use delete_key.
Example (TOML): target="project.dependencies" value_match='"old-package"' Example (Python): target="ITEMS" value_match='"old-item"'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| target | Yes | ||
| value_match | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |