Required. Python code which will be invoked in tool fake mode.
Expected Python function signature -
To catch all tool calls:
def fake_tool_call(tool: Tool, input: dict[str, Any],
callback_context: CallbackContext) -> Optional[dict[str, Any]]:
To catch a specific tool call:
def fake_{tool_id}(tool: Tool, input: dict[str, Any],
callback_context: CallbackContext) -> Optional[dict[str, Any]]:
If the function returns None, the real tool will be invoked instead.
Required. Python code which will be invoked in tool fake mode.
Expected Python function signature -
To catch all tool calls:
def fake_tool_call(tool: Tool, input: dict[str, Any],
callback_context: CallbackContext) -> Optional[dict[str, Any]]:
To catch a specific tool call:
def fake_{tool_id}(tool: Tool, input: dict[str, Any],
callback_context: CallbackContext) -> Optional[dict[str, Any]]:
If the function returns None, the real tool will be invoked instead.
Required. Python code which will be invoked in tool fake mode.
Expected Python function signature -
To catch all tool calls:
def fake_tool_call(tool: Tool, input: dict[str, Any],
callback_context: CallbackContext) -> Optional[dict[str, Any]]:
To catch a specific tool call:
def fake_{tool_id}(tool: Tool, input: dict[str, Any],
callback_context: CallbackContext) -> Optional[dict[str, Any]]:
If the function returns None, the real tool will be invoked instead.
Required. Python code which will be invoked in tool fake mode.
Expected Python function signature -
To catch all tool calls:
def fake_tool_call(tool: Tool, input: dict[str, Any],
callback_context: CallbackContext) -> Optional[dict[str, Any]]:
To catch a specific tool call:
def fake_{tool_id}(tool: Tool, input: dict[str, Any],
callback_context: CallbackContext) -> Optional[dict[str, Any]]:
If the function returns None, the real tool will be invoked instead.
Required. Python code which will be invoked in tool fake mode.
Expected Python function signature -
To catch all tool calls:
def fake_tool_call(tool: Tool, input: dict[str, Any],
callback_context: CallbackContext) -> Optional[dict[str, Any]]:
To catch a specific tool call:
def fake_{tool_id}(tool: Tool, input: dict[str, Any],
callback_context: CallbackContext) -> Optional[dict[str, Any]]:
If the function returns None, the real tool will be invoked instead.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-02-27 UTC."],[],[]]