insert_after
Insert content as a sibling immediately after a named symbol like a function, class, or method in code files. Use for precise placement between existing elements without editing the entire file.
Instructions
Insert content as a sibling immediately after a named symbol (function, class, method, or top-level assignment).
Use this when: You need precise placement right after a symbol (e.g. a helper
just after the function that uses it, or a new function between two existing ones).
Don't use this when: You just want to append to the end of the file -> use
add_top_level.
Example: target="LRUCache" content="RELATED_CONSTANT = 42"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| target | Yes | ||
| content | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |