edit_http_function
Edit a single HTTP function by name in a code file. Fix bugs, rename, add, or remove one function; use full-content update for larger refactors.
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) |