pub fn (d &MCPGen) @{function.name}_tool_handler(arguments map[string]Any) !mcp.ToolCallResult { @{decode_stmts} result := @{function_call} or { return mcp.error_tool_call_result(err) } return mcp.ToolCallResult{ is_error: false content: mcp.result_to_mcp_tool_contents[@{result.symbol()}](result) } }