replace_function
Rewrite a function entirely by replacing its signature, body, and decorators in one operation.
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 |
|---|---|---|---|
| target | Yes | ||
| content | Yes | ||
| file_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |