Update function
update_functionChange a function: replace its code, apply search-and-replace edits (each old_text must match exactly once), and/or change its name, HTTP exposure, method, visibility, MCP tool setting, before/after, schedule, caching or description. Creates a new draft version.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project": "<project>",
"function": "<function>"
},
"name": "update_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mcp | No | MCP tool (true/false), or null to keep | |
| code | No | Complete new code (or null) | |
| http | No | Expose over HTTP (true/false), or null to keep | |
| name | No | ||
| edits | No | ||
| method | No | ||
| project | Yes | Project id (p…) or address (slug) | |
| callable | No | Other functions may call it (false: only schedules, MCP and the console); null keeps | |
| function | Yes | Function name (e.g. "orders") or id (e…) | |
| schedule | No | Run automatically (published version only, at most every 5 minutes): cron in the given timezone | |
| visibility | No | ||
| description | No | ||
| before_after | No | HTTP functions: false skips the before/after functions; null keeps | |
| input_schema | No | New input JSON Schema, or null to keep | |
| cache_seconds | No | Edge caching for GET functions: seconds successful live responses are served from the CDN (0 turns it off, null keeps the setting) | |
| output_schema | No | New output JSON Schema, or null to keep | |
| remove_schedule | No |