edit_http_function
Edit HTTP function files by function name to fix bugs, rename, or add code. Supports replace, add, remove, and import updates, returning updated function list.
Instructions
Edit the HTTP function file by function name — best for targeted changes (fix a bug, rename, add one function). For writing multiple new functions or major refactors, use update_http_function with full content instead. Actions:
"replace_function": replace an ENTIRE function by name with new code. Server finds function boundaries automatically.
"add": append new function code at end of file.
"remove": remove a function by name.
"update_imports": replace the import block (lines before first export). Returns updated function list after edit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | New function code (for replace_function and add) or new import block (for update_imports) | |
| action | Yes | Edit action | |
| function_name | No | Target function name (for replace_function and remove) |