A code block to be executed instead of a real tool call.
Attribute
Name
Description
python_code
str
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-04-01 UTC."],[],[]]