replace_function
Replace an entire function definition including signature, body, and decorators. Use for full rewrites of a function's structure.
Instructions
Replace an entire function definition with new content -- signature, body, and decorators.
Use this when: You're rewriting a function top-to-bottom (e.g., renaming it,
changing parameters AND implementation together).
Don't use this when: You only need to change the body -> use replace_function_body.
You only need to change the signature -> use replace_signature.
Example: target="LRUCache.get" content=' def get(self, key, default=None):\n return self.items.get(key, default)'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| target | Yes | ||
| content | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |