Fix user tool execute() signature to accept ctx keyword argument
The tool_executor always passes ctx=ctx when calling tool.execute(),
but _try_module_level in loader.py created user tools with
_execute(self, params) only. This caused:

  Error: _execute() got an unexpected keyword argument 'ctx'

when calling get_current_datetime and any other module-level user tool.

- Add ctx=None parameter to the generated _execute wrapper
- Preserves backward compatibility with existing user tools

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent f08992b commit b2be3a19a8f435cc24d97fc9b820b5e46ea56899
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 25 May
Showing 1 changed file
View
navi/tools/_internal/loader.py