append_to_array
Adds items to arrays in JSON, YAML, TOML, and Python files by specifying target paths or variable names for structured data management.
Instructions
Append a literal value to an array/list. Works for JSON arrays, YAML sequences, TOML 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 (e.g. 'ITEMS').
Use this when: You want to add an item to a list (dependencies, keywords,
include paths, fixtures, etc.).
Don't use this when: You're adding a key-value pair -> use add_key.
Example (TOML): target="project.dependencies" value='"new-package"' Example (Python): target="ITEMS" value='"new-item"'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| target | Yes | ||
| value | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |