What breaks
_get_required_fields() in src/google/adk/tools/_function_parameter_parse_util.py has a bare return statement (line 437) that returns None instead of an empty list when schema.properties is falsy (empty dict or None). The return value is assigned to declaration.parameters.required in _automatic_function_calling_util.py. Any subsequent code that iterates over .required — validation, serialization, downstream processing — raises TypeError: 'NoneType' object is not iterable.
This triggers whenever a function has no non-ignored parameters (e.g. a function that only accepts tool_context with all params in ignore_params).
TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
File ..., line 43, in <module>
_ = [r for r in schema.required]
^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable
Root cause
Line 437: return (returns None) instead of return [].
Fix
One-character change: return → return [] on line 437 of _function_parameter_parse_util.py.
What breaks
_get_required_fields()insrc/google/adk/tools/_function_parameter_parse_util.pyhas a barereturnstatement (line 437) that returnsNoneinstead of an empty list whenschema.propertiesis falsy (empty dict orNone). The return value is assigned todeclaration.parameters.requiredin_automatic_function_calling_util.py. Any subsequent code that iterates over.required— validation, serialization, downstream processing — raisesTypeError: 'NoneType' object is not iterable.This triggers whenever a function has no non-ignored parameters (e.g. a function that only accepts
tool_contextwith all params inignore_params).Root cause
Line 437:
return(returnsNone) instead ofreturn [].Fix
One-character change:
return→return []on line 437 of_function_parameter_parse_util.py.