agent_functions_update_code
Replace one Code function (functionId from agent_functions_list) with a complete new definition: every field is required, so start from agent_functions_get_code and change only what the user asked. The proposed tests run first; a failing edit never replaces the current function. Show the exact function name, receptionist, behaviour, active state, language and a summary of the code and tests, then get explicit confirmation before calling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Function name the receptionist sees as a tool, e.g. "check_order_status". | |
| isActive | Yes | Whether receptionists may call it after the edit. | |
| codeSource | Yes | Complete source defining main(input, context) that returns the result; see agent_functions_get_guide for the contract and sandbox limits. | |
| functionId | Yes | Agent Function ID from agent_functions_list. | |
| description | Yes | What the function does, in one or two plain sentences. | |
| inputSchema | Yes | Root input definition: a field of type "object" whose children are the arguments the receptionist passes (name, type, description, validations), e.g. {"name":"input","type":"object","children":[{"name":"orderNumber","type":"string","description":"Order number the caller gives"}]}. | |
| instruction | Yes | When and how the receptionist should call it on a live call, e.g. "Call when a caller asks where their order is; ask for the order number first." | |
| codeLanguage | Yes | Language of codeSource: PYTHON, JAVASCRIPT or TYPESCRIPT. | |
| codeTestCases | Yes | The complete new test list (1-25), replacing the saved tests; all must pass or nothing changes. |